0

I got this section in my web.config:

<browserCaps>
  <case match="^Mozilla/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">
    <case match="^[5-9]\." with="${version}">tagwriter=System.Web.UI.HtmlTextWriter</case>
  </case>
</browserCaps>

It must come from an older project from witch we start this one. We started this one about 4 years ago.

Anyways, seeing that, it seems to say "If the user agent is Mozilla, use a different HtmlTextWriter".

I suppose a different HtmlTextWriter means different results in the markups for the same server code. If it is so, it is in my opinion very nasty.

Can anyone confirm if it is the case or not? Maybe I misunderstood the whole thing ?

Johnny5
  • 6,664
  • 3
  • 45
  • 78

1 Answers1

1

Take a look at this: http://msdn.microsoft.com/en-us/library/sk9az15a.aspx

Looks like this was deprecated when .net 2 came out (in 2005).

Aaron Barker
  • 706
  • 7
  • 14
  • Interesting, but that does not tell me what this config section does. – Johnny5 Aug 08 '11 at 13:05
  • from what I can understand from the MSDN link - the browserCaps entry example in your post tells asp.net to use the System.Web.UI.HtmlTextWriter as the tagwriter if Mozilla is the user agent. Exactly what you thought... Rendering different markup based on the user agent, is actually a very common practice (especially for mobile use). – Aaron Barker Aug 08 '11 at 16:59