473,747 Members | 3,014 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.NET, CSS, and Netscape 7.1

I was testing out a page of mine that displays the information from
Page.Request.Br owser. It works exactly as I expected in Internet Explorer
and Netscape 4.75 (I didn't expect much in Netscape 4.75, but I got some
stuff). However, Netscape 7.1 gave me some strange stuff, including the
following:

1. It gave the Version as 5.0 rather than 7.1, and the Type as Netscape5
2. ASP.NET did not send any CSS other than the constant part that I entered
manually in the .aspx file

I am assuming that strange thing #1 is simply because it sends a strange
User-Agent string. However, strange thing #2 I have no explanation for,
since even though Netscape 7.1 does not support ALL the CSS I use, it does
support some. I would also like to know what ASP.NET uses to determine
whether or not to send CSS, since Page.Request.Br owser does not have a
property that specifies whether the client supports CSS. Any help would be
appreciated.

NOTE: The page I was testing out is located at the following URL:
http://www.nathansokalski.com/Browser.aspx

--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/
Mar 12 '06 #1
4 1835


--
Terry Burns
http://TrainingOn.net
"Nathan Sokalski" <nj********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
I was testing out a page of mine that displays the information from
Page.Request.B rowser. It works exactly as I expected in Internet Explorer
and Netscape 4.75 (I didn't expect much in Netscape 4.75, but I got some
stuff). However, Netscape 7.1 gave me some strange stuff, including the
following:
1. It gave the Version as 5.0 rather than 7.1, and the Type as Netscape5 What gave 5.0 ?, can you be more specific ?

2. ASP.NET did not send any CSS other than the constant part that I
entered manually in the .aspx file Are you saying that the in-line styles did not render to Netscape.?
I am assuming that strange thing #1 is simply because it sends a strange
User-Agent string. However, strange thing #2 I have no explanation for,
since even though Netscape 7.1 does not support ALL the CSS I use, it does
support some. I would also like to know what ASP.NET uses to determine
whether or not to send CSS, since Page.Request.Br owser does not have a
property that specifies whether the client supports CSS. Any help would be
appreciated.
You dont specify what version of ASP.NET you are using?

ASP.NET 2003 should have no problems rendering in-line styles to Explorer
or Netscape. as for CSS stylesheets, providing the browser supports it,
you should have no problem. ASP.NET controls know how to render
themselves.


NOTE: The page I was testing out is located at the following URL:
http://www.nathansokalski.com/Browser.aspx

--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

Mar 12 '06 #2
>> 1. It gave the Version as 5.0 rather than 7.1, and the Type as Netscape5
What gave 5.0 ?, can you be more specific ? Page.Request.Br owser.Version returned the value "5.0"
Page.Request.Br owser.Type returned the value "Netscape5"
2. ASP.NET did not send any CSS other than the constant part that I
entered manually in the .aspx file

Are you saying that the in-line styles did not render to Netscape.?

Yes, that is exactly what I am saying. The output rendered for the Label
Controls was like the following:

Netscape recieved the output like the following:
<span>Browser </span>

Internet Explorer recieved the output like the following:
<span style="backgrou nd-color:Silver;wi dth:175px;">Bro wser</span>
You dont specify what version of ASP.NET you are using? I am using ASP.NET 1.1.4322

I don't know whether or not you have Netscape 7.1 on your machine, but if
you do you can try it out and do a view Page Source to see the results for
yourself using the link I included in my original message. Something that I
did find on the web at
http://www.code-magazine.com/article...printmode=true
mentions that this is true for most non-Microsoft browsers, as in the
following paragraphs that I have copied from the page:
The downside to checking the type of the passed HtmlTextWriter is that
virtually all non-Microsoft browsers, including Netscape versions that do
support CSS, pass Html32TextWrite r to the Render method. So even a Netscape
6 browser would receive HTML 3.2, even though it supports CSS perfectly. The
only way to get around this is by changing machine.config to add:

tagwriter=Syste m.Web.UI.HtmlTe xtWriter

to each browser that supports CSS. This is risky though, because this may
not only impact CSS support. So test if your application still works
properly after changing machine.config.

If you know of any better workarounds than modifying the machine.config file
(well, I would probably be forced to add the stuff to my web.config since my
site is on a webhosting service and therefore do not have access to
machine.config) , please let me know. I think that there should be a
Page.Request.Br owser.CSS property, but since there isn't, I don't know what
else to do. Thanks.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Terry Burns" <me@mine.com> wrote in message
news:u8******** ******@TK2MSFTN GP11.phx.gbl...

--
Terry Burns
http://TrainingOn.net
"Nathan Sokalski" <nj********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
I was testing out a page of mine that displays the information from
Page.Request. Browser. It works exactly as I expected in Internet Explorer
and Netscape 4.75 (I didn't expect much in Netscape 4.75, but I got some
stuff). However, Netscape 7.1 gave me some strange stuff, including the
following:


1. It gave the Version as 5.0 rather than 7.1, and the Type as Netscape5

What gave 5.0 ?, can you be more specific ?

2. ASP.NET did not send any CSS other than the constant part that I
entered manually in the .aspx file

Are you saying that the in-line styles did not render to Netscape.?
I am assuming that strange thing #1 is simply because it sends a strange
User-Agent string. However, strange thing #2 I have no explanation for,
since even though Netscape 7.1 does not support ALL the CSS I use, it
does support some. I would also like to know what ASP.NET uses to
determine whether or not to send CSS, since Page.Request.Br owser does not
have a property that specifies whether the client supports CSS. Any help
would be appreciated.


You dont specify what version of ASP.NET you are using?

ASP.NET 2003 should have no problems rendering in-line styles to Explorer
or Netscape. as for CSS stylesheets, providing the browser supports it,
you should have no problem. ASP.NET controls know how to render
themselves.


NOTE: The page I was testing out is located at the following URL:
http://www.nathansokalski.com/Browser.aspx

--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/


Mar 12 '06 #3
Nathan Sokalski wrote:
The only way to get around this is by
changing machine.config to add:
tagwriter=Syste m.Web.UI.HtmlTe xtWriter

to each browser that supports CSS. This is risky though, because this
may not only impact CSS support. So test if your application still
works properly after changing machine.config.


This may interest you:-
"BrowserCap s update for modern browsers,
http://slingfive.com/pages/code/browserCaps/ "

Andrew
Mar 13 '06 #4
Thanks! That is probably the best update I've seen, I want to know why
Microsoft doesn't give updates like that! Thanks again, I really appreciate
it, I will add it to my web.config right away.
--
Nathan Sokalski
nj********@hotm ail.com
http://www.nathansokalski.com/

"Andrew Morton" <ak*@in-press.co.uk.inv alid> wrote in message
news:Or******** ********@TK2MSF TNGP11.phx.gbl. ..
Nathan Sokalski wrote:
The only way to get around this is by
changing machine.config to add:
tagwriter=Syste m.Web.UI.HtmlTe xtWriter

to each browser that supports CSS. This is risky though, because this
may not only impact CSS support. So test if your application still
works properly after changing machine.config.


This may interest you:-
"BrowserCap s update for modern browsers,
http://slingfive.com/pages/code/browserCaps/ "

Andrew

Mar 13 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5035
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if (preg_match("/Mozilla/i", $info)) {
1
9593
by: mark.reichman | last post by:
First off.. Thanks to Grant Wagner for help in a previous thread related to this one. I am at a total loss... I have multiple fields in a form with the same name. Lets call the fields with the same name "junk_array". My first field of junk_array is a input type=hidden. All the others fields in junk_array that follow are type=text. I can reference this first hidden field in IE with document.form.field.value. In, fact my form works...
9
2551
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to make my scripts multi-browser, when they don't bother giving me basic documentation?
2
2200
by: SabMan | last post by:
I understand that document.layers is no longer supported in Netscape 7.1 but I am not sure on how to fix the code so that it will work with Netscape 7.1. I understand that document.all is no longer supported in IE6 but I am not sure on how to fix the code so that it will work with IE6. <!--
26
2201
by: Roger Desparois | last post by:
Hi, I need help : I found the simplest and most precise way to open and close submenu layers. it works perfectly with IE, but for some odd reason NS won't recognize it. Can anyone tell me why ? And is there a way around the problem ?
6
1914
by: qqq | last post by:
I'm a relative newbie... I'd like my site to support Netscape browsers. For a page I set 'TargetSchema' to 'IE 3.02/Netscape 3'. When I insert label or textbox web controls on the page, they appear with no size/color/border attributes etc. when viewed in Netscape. They appear just fine in IE. Can someone please explain? Thanks - Paul.
10
2375
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name = navigator.appName;
4
1115
by: Nathan Sokalski | last post by:
I was testing out a page of mine that displays the information from Page.Request.Browser. It works exactly as I expected in Internet Explorer and Netscape 4.75 (I didn't expect much in Netscape 4.75, but I got some stuff). However, Netscape 7.1 gave me some strange stuff, including the following: 1. It gave the Version as 5.0 rather than 7.1, and the Type as Netscape5 2. ASP.NET did not send any CSS other than the constant part that I...
0
8979
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9522
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9307
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9223
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4588
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4860
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2771
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.