<%@ Master Language="C#" ClassName="SiteMaster" %> <script runat="server"> protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); ThemeSelector.DataSource = new System.IO.DirectoryInfo(Request.MapPath("~/App_Themes")).GetDirectories(); ThemeSelector.DataMember = "Name"; ThemeSelector.DataBind(); ThemeSelector.SelectedValue = String.IsNullOrEmpty(Page.Theme) ? "Default" : Page.Theme; //Register an hiiden field that gives the ID of the selector control //as we don't know what it will be this.Page.ClientScript.RegisterHiddenField("ThemeSelectorId", ThemeSelector.UniqueID); } </script> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Message Board</title> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> </head> <body> <form id="form1" runat="server"> <div> <h1> <span>Message Board</span></h1> <div id="mainControlBar"> <ul class="LinkList"> <li><a href="Default.aspx">Home</a></li> <li><asp:LoginStatus ID="LoginStatus" runat="server" /></li> <li><a href="Register.aspx">Register</a></li> <li><a href="Settings.aspx">Settings</a></li> <li><a href="Feed.svc/GetLatestMessages?format=Rss">Rss</a></li> <li><a href="Feed.svc/GetLatestMessages?format=Atom">Atom</a></li> </ul> <div id="themeSelectorPanel"> <asp:Label AssociatedControlID="ThemeSelector" runat="server" Text="Theme:" CssClass="themeSelectorLabel" AccessKey="T" /> <asp:DropDownList runat="server" class="ThemeSelector" ID="ThemeSelector" AutoPostBack="true" /> </div> </div> <asp:ContentPlaceHolder ID="MainContent" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html>
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)