Q

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'\.
d+)(?'letters'w*)).*">

In .NET v1.1 it will be:

<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+ )?Netscape6/
(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">

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

  <!-- Patch to output attributes for NS6+/Mozilla1.x -->
  tagwriter=System.Web.UI.HtmlTextWriter

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.

This was first published in June 2003

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close