Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > ASP.NET, CSS, and Netscape 7.1

Reply
Thread Tools

ASP.NET, CSS, and Netscape 7.1

 
 
Nathan Sokalski
Guest
Posts: n/a
 
      03-12-2006
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 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.Browser 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
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.nathansokalski.com/


 
Reply With Quote
 
 
 
 
Terry Burns
Guest
Posts: n/a
 
      03-12-2006


--
Terry Burns
http://TrainingOn.net
"Nathan Sokalski" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>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.Browser 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
> (E-Mail Removed)
> http://www.nathansokalski.com/
>



 
Reply With Quote
 
 
 
 
Nathan Sokalski
Guest
Posts: n/a
 
      03-12-2006
>> 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.Browser.Version returned the value "5.0"
Page.Request.Browser.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="background-color:Silver;width:175px;">Browser</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 Html32TextWriter 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=System.Web.UI.HtmlTextWriter

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.Browser.CSS property, but since there isn't, I don't know what
else to do. Thanks.
--
Nathan Sokalski
(E-Mail Removed)
http://www.nathansokalski.com/

"Terry Burns" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> --
> Terry Burns
> http://TrainingOn.net
> "Nathan Sokalski" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>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.Browser 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
>> (E-Mail Removed)
>> http://www.nathansokalski.com/
>>

>
>



 
Reply With Quote
 
Andrew Morton
Guest
Posts: n/a
 
      03-13-2006
Nathan Sokalski wrote:
> The only way to get around this is by
> changing machine.config to add:
> tagwriter=System.Web.UI.HtmlTextWriter
>
> 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:-
"BrowserCaps update for modern browsers,
http://slingfive.com/pages/code/browserCaps/ "

Andrew


 
Reply With Quote
 
Nathan Sokalski
Guest
Posts: n/a
 
      03-13-2006
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
(E-Mail Removed)
http://www.nathansokalski.com/

"Andrew Morton" <(E-Mail Removed)> wrote in message
news:OrGfO%(E-Mail Removed)...
> Nathan Sokalski wrote:
>> The only way to get around this is by
>> changing machine.config to add:
>> tagwriter=System.Web.UI.HtmlTextWriter
>>
>> 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:-
> "BrowserCaps update for modern browsers,
> http://slingfive.com/pages/code/browserCaps/ "
>
> Andrew
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Netscape 7.1 to Netscape 8 Skid Schermerhorn Firefox 2 09-05-2005 04:04 PM
Accessing Netscape mail via Netscape mail client A. Toprak Computer Support 0 12-24-2004 06:46 AM
Netscape with JRE 1.5 beta 1 ignores Netscape signing Mickey Segal Java 1 05-21-2004 01:52 PM
websphere, oracle, netscape: netscape timeout Tom Java 0 08-01-2003 11:03 PM
How to disable right click menu in IE, Netscape 4 and Netscape 6 yaktipper Javascript 10 07-10-2003 04:15 PM



Advertisments