How to change theme in asp.net

1 Add Skin file in to folder like below


2 Create DropDownList

<asp:dropdownlist id="ChooseTheme" runat="server" autopostback="true">
<asp:ListItem Value="Theme1">Theme1</asp:ListItem>
<asp:ListItem Value="Theme2">Theme2</asp:ListItem>
</asp:dropdownlist> 

3 Coding Behind Default Page

Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
        Page.Theme = Request("ChooseTheme")

End Sub

Share this

Related Posts

Previous
Next Post »