Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Two Thumbs Down for HtmlHead

Note: this entry has moved.

As you may already know ASP.NET 2.0 will include a new control, HtmlHead, to serve all your <head> handling needs thus making all previous v1.x hacks unnecessary by providing programmatic access to that tag. So far so good. Let’s hear the bad now.

 

First thumb down: I received a response in LadyBug stating that viewstate support will not be added to HtmlHead. This was after I chimed about it. Sadly, they didn’t include an explanation backing up their decision (not that they have to but it would have been nice). While I agree that the most common scenario may not require viewstate handling there may be cases where it could be useful, so why not adding support for it and just set EnableViewState to false if you don’t want it?; with this approach you’re giving developers a choice at least…

 

Second thumb down: HtmlHead handling of meta tags is incomplete, or better said, *very* incomplete. Its RenderControl method is hardcoded to output only name and content attributes. What about support for other valid attributes like http-equiv and scheme? It’s just not there. Please, please… make this control more ‘standard-aware’, look at section 7.4.4 of the HTML401 spec and add support for it. It should be a piece of cake. I’ve filled a new bug in LadyBug (#FDBK11439), let’s see how this one turns up.

 

Considering the bits are in beta 1 now and that there are –for sure- more important bugs/issues/whatever to be fixed, my guess is that this poor little control will not get much more attention and will hit gold in its current status…

4 Comments

  • Have they given any kind of reason?



    It seems like both would be simple to fix.

  • My guess is that the HtmlHead control is not within the Form tag, so it cannot post information, so it would be very difficult to implement viewstate.

  • Andrew: no reason was given and yes I believe it should be easy to implement this. The second issue, HtmlHead's output incomplete support of the standard is currently being reviewed by the team. This one should be also really easy to implement.

  • Josh: a control can store state into viewstate even if it is not inside a form tag, this is enough to make HtmlHead to store some of its state into viewstate and letting the dev choose if he/she wants this or not, i believe this could be useful in some scenarios; now if you're thinking about posting client-side modification of the &lt;head&gt; then thats another different whole story and not exactly what I had in mind.

Comments have been disabled for this content.