Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > HtmlHead is not inheritable how can I prevent the <title> tag from rendering?

Reply
Thread Tools

HtmlHead is not inheritable how can I prevent the <title> tag from rendering?

 
 
Alexander Walker
Guest
Posts: n/a
 
      02-23-2006
Hello

I am trying to prevent the <title> tag from rendering in an HtmlHead control.
How can I do this?

I have been trying to replace it with a web user control that I have created
which renders the title tag and takes advantage of caching features

My main problem is that the HtmlHead control renders the <title> tag even though
my web user control has already rendered the <title> tag

This doesn't cause any problems in the web browser but it doesn't validate as
xhtml transitional, I want to the page to render as valid xhtml transitional so
I have to make sure that there isn't a duplicate <title> in the <head>

What can I do?

Alex


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      02-23-2006
Hi Alex,

Thanks for posting.

As for the HtmlHead's title generation problem, are you using ASP.NET 1.1
or 2.0 for your application currently? If you're using ASP.NET 2.0 page, t
he HtmlHead property of the Page class will always render out the Title
element and so far what I've tried is setting the "Header" property's
Visible property to false which will make the entire <head> section not
rendered. If you can completely put your own control to render the head
section, this will be one possible approach.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      02-23-2006
Well, I've just tested and found that you can manually locate the "Title"
sub control in the Page.Header.Controls collection which is of HtmlTitle
type. Then, just set its Visible to false to prevent it from being rendered.

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
Alexander Walker
Guest
Posts: n/a
 
      02-25-2006
Thanks Steven, thats a great help


 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      02-27-2006
You're welcome Alex,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
friendship not inheritable Hicham Mouline C++ 4 11-17-2008 10:23 AM
Search for rules in HtmlHead.StyleSheet property J055 ASP .Net 5 11-02-2007 02:38 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
How to prevent a class from being inheritable, in C++ Saumya C++ 11 03-02-2004 01:10 PM



Advertisments