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?
Brock Allen - 22 Jul 2005 20:32 GMT
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,
[quoted text clipped - 12 lines]
>
> Anyone know if there will be a way to override these declarations?