Re: ASP.NET 2 Tag Resolution
- From: Brock Allen <ballen@xxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Jul 2005 12:32:32 -0700
In 2.0 they've encouraged the <head> to be a server control -- it's now a defined property on the Page base class, and they've exposed a Title property for this scenario:
Page.Head.Title = "Welcome";
-Brock DevelopMentor http://staff.develop.com/ballen
Interesting problem. I've begun working with my master page in ASP.NET 2, and I wanted to be able set my <title> tag as an HTML control. So, after making the necessary changes to the tag, I went into the code behind and started coding. The problem was that the code behind recognized my <title> tag as an HtmlGenericControl, instead of the HtmlTitle control that it really should be.
I tried to override the auto-declaration with my own protected declaration, but alas, it gave me an error that it was already declared.
I can work around this issue for now, but I'm worried that we're loosing control of something and we can't be guaranteed that it will work 100% of the time.
Anyone know if there will be a way to override these declarations?
.
- References:
- ASP.NET 2 Tag Resolution
- From: Chris Welch
- ASP.NET 2 Tag Resolution
- Prev by Date: Regex -- Replace "-*?\n" with ""
- Next by Date: RE: static variable in Global.asax, Application_Start assignment of it
- Previous by thread: ASP.NET 2 Tag Resolution
- Next by thread: button and post back
- Index(es):