Problem solve Get help with specific problems with your technologies, process and projects.

How do I get my ASP.NET prorams to work for Internet Explorer and Netscape Navigator?

How do I make my ASP.NET work similarly for both Internet Explorer and Netscape Navigator? Some of my controls are not working the same in both of them.
Up front, you should "patch" the machine.config file. There's a section called browserCaps which is used to detect the features a browser supports. Unfortunately (suspiciously) Mozila/Netscape capabilities are not properly detected. Inside that section, locate the following element (all in one line):

<case match="^Mozilla/5\.0 \([^)]*\)
(Gecko/[-\d]+ )?Netscape[6|7]/(?'version'(?'major'\d+)(?'minor'\.

In .NET v1.1 it will be:

<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+ )?Netscape6/

This element defines the features those browsers support. Add the following bellow it:

  <!-- Patch to output attributes for NS6+/Mozilla1.x -->

What this attribute tells ASP.NET is that Mozilla/Netscape supports tags written in the same way as IE, so that it uses this writer instead of the default Html32TextWriter which omits most attributes, including CSS ones. According to Microsoft?s comments, this patch and future ones will be available from a third party, cyScape, Inc. That's what the machine.config file says at least. But I couldn't find any update so far :S.

Dig Deeper on ASP.NET development best practices

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.