Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Is this possible with themes? (http://www.velocityreviews.com/forums/t506444-is-this-possible-with-themes.html)

Jeff 05-14-2007 05:07 PM

Is this possible with themes?
 
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 05-14-2007 07:50 PM

Re: Is this possible with themes?
 
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
>
>


clintonG 05-15-2007 01:05 AM

Re: Is this possible with themes?
 
// 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" <it_consultant1@hotmail.com.NOSPAM> wrote in message
news:u%23GVlpklHHA.208@TK2MSFTNGP05.phx.gbl...
> 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
>





All times are GMT. The time now is 03:22 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57