Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting access to Title tag in Head section
Message
From
29/11/2011 03:53:35
 
 
To
28/11/2011 18:22:57
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01529944
Message ID:
01529954
Views:
48
This message has been marked as the solution to the initial question of the thread.
>I have a Head section and I am trying to find the proper code to obtain a reference to the Title tag:
>
>
><Head id="LXHead"><title></title></Head>
>
>
>I have a reference to the Head control as loHead. But, I cannot use loHead.FindControl() as the Title tag is not a control. I cannot also use the loHead.Attributes() approach as the Title tag is not an attribute to the Head section. The only attribute in the Head section is ID. So, is there a way to obtain a reference to this Title tag?
>
>The problem I am having right now is that this Title tag is not even there at all. At the PreRenderRequest() event, it seems to get added there by default during the rendering process. So, as my .aspx pages does not have a Title tag, the framework does that automatically by adding the proper title. So, it adds a title on its own. But, I just discovered that this ends up with two titles in the result page sent to the client as an automatic Title tag get added somewhere.

Maybe I missing something but can't you just set this in the Page_Load. :
If Me.Header.Title = String.Empty Then
Me,Header.Title = "I set this"
End If
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform