Is this possible with themes?

Discussion in 'ASP .Net' started by Jeff, May 14, 2007.

  1. Jeff

    Jeff Guest

    ASP.NET 2.0

    I have developed a webpage which are using themes, the webpage contain a
    dropdownlist where the user can select the theme for the page...

    This webpage (.aspx) contain a table (asp:Table). Here is my problem I want
    to completely change the layout of the table based on what theme is
    selected. For example one of the table cells contain a image (server
    control) and by selecting another theme then I want the image to appear in
    another table cell in the table - completely changing the layout of the
    table, not just setting colors and such things... Is it possible??

    If this is possible then please explain me how to do it!

    Jeff
    Jeff, May 14, 2007
    #1
    1. Advertising

  2. Jeff

    bruce barker Guest

    maybe. themes only use css styles. if you switch from a table to divs,
    then the css themes can control the layout.

    -- bruce (sqlwork.com)

    Jeff wrote:
    > ASP.NET 2.0
    >
    > I have developed a webpage which are using themes, the webpage contain a
    > dropdownlist where the user can select the theme for the page...
    >
    > This webpage (.aspx) contain a table (asp:Table). Here is my problem I want
    > to completely change the layout of the table based on what theme is
    > selected. For example one of the table cells contain a image (server
    > control) and by selecting another theme then I want the image to appear in
    > another table cell in the table - completely changing the layout of the
    > table, not just setting colors and such things... Is it possible??
    >
    > If this is possible then please explain me how to do it!
    >
    > Jeff
    >
    >
    bruce barker, May 14, 2007
    #2
    1. Advertising

  3. Jeff

    clintonG Guest

    // Put the following into the Page_Load event and tell me what you see...
    Page.Title = Page.Theme;

    As you've learned we have to change the Theme from the Page_PreInit event
    but we can access the current Theme from anywhere the Page is accessible.
    Assuming you're using Visual Studio I have to ask if you've ever heard of
    Intellisense :) So build yourself a simple switch statement and put it into
    the Page_Load event...

    switch (Page.Theme)
    {
    case "Blue" :
    // load the table you want here
    break;
    case "Green" :
    // load the other table you want here
    break;
    default "Blue" :
    // load the table you want as the default here
    break;
    }

    Finally, before you get much deeper into the doo-doo you better do some
    homework and learn the difference between the Theme and the StyleSheetTheme.
    K. Scott Allen has documented both Master Pages and Themes extensively [1].

    <%= Clinton Gallagher
    NET csgallagher AT metromilwaukee.com
    URL http://clintongallagher.metromilwaukee.com/

    [1] http://odetocode.com/


    "Jeff" <> wrote in message
    news:u%...
    > ASP.NET 2.0
    >
    > I have developed a webpage which are using themes, the webpage contain a
    > dropdownlist where the user can select the theme for the page...
    >
    > This webpage (.aspx) contain a table (asp:Table). Here is my problem I
    > want to completely change the layout of the table based on what theme is
    > selected. For example one of the table cells contain a image (server
    > control) and by selecting another theme then I want the image to appear in
    > another table cell in the table - completely changing the layout of the
    > table, not just setting colors and such things... Is it possible??
    >
    > If this is possible then please explain me how to do it!
    >
    > Jeff
    >
    clintonG, May 15, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Weatherford

    Re: Applying Frontpage 2003 themes to ASP.NEt Pages

    Robert Weatherford, Jun 12, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    373
    Robert Weatherford
    Jun 12, 2004
  2. Martin

    ASP.Net 2.0 themes vs css

    Martin, Jun 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,616
    Martin
    Jun 23, 2004
  3. Jack
    Replies:
    2
    Views:
    394
  4. Brian Henry

    ASP.NET 2.0 Master pages and themes

    Brian Henry, Jul 10, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,196
    Brian Henry
    Jul 11, 2004
  5. RichardF

    Problem with Themes in asp.net 2.0

    RichardF, Nov 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,654
    Jeffrey Palermo [MCP]
    Nov 7, 2004
Loading...

Share This Page