Tech Off Thread

3 posts

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.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.