programmatic page title?

Chensedge

New Member
Hey All,<BR><BR>Anybody found a way to programmatically assign a title to a page? I've looked through the page members and there isn't anything mentioned.<BR><BR>Thx,<BR><BR>])ryIt's because the Page class is abstracting defining an ASP.NET Web page which has absolutely nothing to do with the title of an HTML document. All you need to do is spit out text in the title tag, like so:<BR><BR><script language="vb" runat="server"><BR>... code here ...<BR></script><BR><BR><HTML><BR><HEAD><BR> <TITLE><%=title%></TITLE><BR></HEAD><BR>... rest of HTML ...<BR><BR>or you can place a literal control in the title tag:<BR><BR><asp:literal runat="server" id="pageTitle" /><BR><BR>and set it's contents in the Page_Load event handler (pageTitle.Text="My First Web Page")<BR><BR>hthOK cool, I was doing it using code blocks like your first example, but was looking for the literal control. <BR>Thanks Scott :)<BR><BR>])ry
 
Back
Top