I'm having a problem changing themes when attempting
to select a theme from a DropDownList and hope
somebody can suggest what is wrong with the branching
logic which seems to be the problem
The .aspx includes EnableTheming="true" in the page
directive.
The DDL AutoPostBack="true" and is briefly declared
as follows:
value="SelectStyleSheet" selected="True">
Select A Style Sheet
value="red">
Red Theme
value="green">
Green Theme
value="blue">
Blue Theme
The red theme should be loaded by default.
The following code does not change style sheets when
a selection is made from the DDL and I'd like to
learn what code should be used so the list item will
continue to show 'Select A Style Sheet' after each
selection...
void Page_PreInit(object sender, System.EventArgs e)
{
if (ChangeStyleSheet.SelectedValue == "SelectStyleSheet")
Page.Theme = "red";
else
Page.Theme = ChangeStyleSheet.SelectedValue.ToString();
}
<%= Clinton Gallagher
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/CSharpNET/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
