Tech Off Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Style Sheets and code behind

Back to Forum: Tech Off
  • User profile image
    lesmemphis

    I need to load values via code behind as such:

     

    SPMS2CRS.SdlVenue venueDetails = new SPMS2CRS.SdlVenue();
    venueDetails.load(getVenueID(), SPMS2CRS.SdlDB.newConnection());

     

    I need to set the page background color, table header colors, panel colors etc via values I recieved from this class.

     

    (venueDetails.BodyBGColor etc.)

     

    can this be loaded into a stylesheet that can be loaded from multiple pages, or will I need to set the attributes through each page's code behind? And how do I do either of these?

  • User profile image
    W3bbo

    You're doing sometihng wrong. The appearance/style of data is independent of content, unless things like colour convey some kind of meaningful information, in which case that information should be in the document XHTML (ideally in a style="" attribute) and not the common stylesheet.

  • User profile image
    lesmemphis

    W3bbo said:

    You're doing sometihng wrong. The appearance/style of data is independent of content, unless things like colour convey some kind of meaningful information, in which case that information should be in the document XHTML (ideally in a style="" attribute) and not the common stylesheet.

    no, I wanted to load the information from a seperate C# class that is initiated in code behind. It's ok though, I just set the values in code behind (server side) directly to the elements I want effected. Each venue that uses our BookNow pages can specify their own color theme.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.