ASP.NET/C# Firefox and Netscape

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

All,

I have created some ASP.NET/C# webpages that displays pefectly in internet
explorer 6.0 but when I use Firefox 1.0 and Netscape 7.1 the page does not
display correctly i.e the text and text boxes for example dont line up they
are smaller in size.

Does anyone now why this is happening and how I can make it look as it does
in IE6.0

Thanks
Msuk
 
Hi,

It may depend of how you builded the page, did you used the designer or
just created the code in the editor? if you used the designer maybe some of
the DHTML generated are not compatibles with NS , also check that the code
is correctyl written, that all start tag has a corresponding ending tag for
example, NS is particulary picky with that.



Cheers,
 
Hi,

I used VS2003 and dragged and dropped the controls onto the page. I didnt
write any HTML code at all. What can I do to overcome this?

I thought .NET was able to work with any browser with the same results.

Thanks
Msuk
 
Hi,

.NET has nothing to do with that really, it depends of the code that VS
generate to position the controls in the page, I have never used this
approach( always write code ) but I bet you it's there where the problem
lies,
how to solve it?
The first step is to put the page layout from grid layout to flow layout,
you have more restriction of how you place your controls but it's more
standard the code generated


cheers,
 
In general the asp.net controls treat browsers other than IE as 3.2
compliant browsers.
You can override this behaviour with some settings in your webconfig.
Basically you allow per user agent wich html gets generated.

OTOMH look for <clientTarget> and|or useragent in the asp.net
documents

martin
 
ASP.NET does not recognize Firefox. Therefore it treats it as a downlevel
browser. To change this you must update the browser capabilitu settings.
This can be done in the web.config file or in the machine.config file. I
recommend the later.
Adding the following snippet to the system.web element in machine.config
should get you sorted:
<browserCaps>
<case match="Gecko/[-\d]+">
browser=Netscape
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:1.0[^\.](?'letters'\w*)">
version=6.0
majorversion=6
minorversion=0
<case match="^b" with="${letters}">
beta=true
</case>
</case>
<case match="rv:1(\.\d+)(\.\d)?(?'letters'\w*)">
version=7.0
majorversion=7
minorversion=0
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
</browserCaps>

You can find updated browsercaps definitions here:
http://slingfive.com/pages/code/browserCaps/

Anders Norås
blog: http://dotnetjunkies.com/weblog/anoras
 
Hi,

thanks for your response, is the snippet just for Netscape or will it handle
Firefox as well? Also looking through your website can you explain what the
difference is between 'updated BrowserCaps with tabs' and 'updated
BrowserCaps with spaces'

Thanks
Msuk

Anders Norås said:
ASP.NET does not recognize Firefox. Therefore it treats it as a downlevel
browser. To change this you must update the browser capabilitu settings.
This can be done in the web.config file or in the machine.config file. I
recommend the later.
Adding the following snippet to the system.web element in machine.config
should get you sorted:
<browserCaps>
<case match="Gecko/[-\d]+">
browser=Netscape
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:1.0[^\.](?'letters'\w*)">
version=6.0
majorversion=6
minorversion=0
<case match="^b" with="${letters}">
beta=true
</case>
</case>
<case match="rv:1(\.\d+)(\.\d)?(?'letters'\w*)">
version=7.0
majorversion=7
minorversion=0
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
</browserCaps>

You can find updated browsercaps definitions here:
http://slingfive.com/pages/code/browserCaps/

Anders Norås
blog: http://dotnetjunkies.com/weblog/anoras
msuk said:
All,

I have created some ASP.NET/C# webpages that displays pefectly in internet
explorer 6.0 but when I use Firefox 1.0 and Netscape 7.1 the page does not
display correctly i.e the text and text boxes for example dont line up
they
are smaller in size.

Does anyone now why this is happening and how I can make it look as it
does
in IE6.0

Thanks
Msuk
 
Back
Top