I noticed in the IDE that the runat attribute is dimmed out in the property window for the <title> tag. I am not sure of the reason.
Either way I went with a client side javascript method to pull out the title of my page and place it in the innertext of a DIV tag in a usercontrol that acts as a header for my pages. Works fine but I am still fascinated with other ways of getting at the <text> tag via codebehind. I think that using a custom ControlBuilder may be a way to get at it. I know that I can read it by building a custom ControlBuilder but I don't now if I can then use it to set another property. The ControlBuilder hooks into the page parsing. I haven't done any research to see if this is to late in the life cycle to modify other parts of the page content. This is all overkill for my original question but is sure is fun exercising this technology. -----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Patten, Dave Sent: Thursday, May 02, 2002 1:38 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Extracting the Title of a Page from CodeBehind? That a known Bug? It should not be removing the RunAt... Why should it? I never use Design view for HTML in the IDE, only HTML View. Experienced way too many problems through the Betas/RCs. -----Original Message----- From: Joseph E Shook [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 1:27 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Extracting the Title of a Page from CodeBehind? That is a nice solution. It works. But Visual Studio removes the runat attribute when switching between HTML and Design view. Also I would still like to extract the title from codebehind without having to add attributes. I could just put a constant in each page but this has turned into a personal exercise in technology. -----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Patten, Dave Sent: Thursday, May 02, 2002 12:59 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Extracting the Title of a Page from CodeBehind? Html: <title id="PageTitle" runat="server">Page Title</title> Code Behind: protected HtmlGenericControl PageTitle; private void Page_Load(object sender, System.EventArgs e) { // get or set PageTitle.InnerText = "New Title"; } -----Original Message----- From: Joseph E Shook [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 12:55 PM To: [EMAIL PROTECTED] Subject: [DOTNET] Extracting the Title of a Page from CodeBehind? Does anyone have a clever way of extracting the title of a page in the codebehind? I am talking about the tile that is resident in the following html tags: <HTML> <HEAD> <title>Page Title</title> </HEAD> <body> </body> </HTML> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.