|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET, CSS, and Netscape 7.1Page.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" <njsokal***@hotmail.com> wrote in message What gave 5.0 ?, can you be more specific ?news:%23rrcjaYRGHA.6084@TK2MSFTNGP14.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 > 2. ASP.NET did not send any CSS other than the constant part that I Are you saying that the in-line styles did not render to Netscape.?> entered manually in the .aspx file > I am assuming that strange thing #1 is simply because it sends a strange You dont specify what version of ASP.NET you are using?> 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. 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. Show quoteHide quote > > NOTE: The page I was testing out is located at the following URL: > http://www.nathansokalski.com/Browser.aspx > > -- > Nathan Sokalski > njsokal***@hotmail.com > http://www.nathansokalski.com/ > >> 1. It gave the Version as 5.0 rather than 7.1, and the Type as Netscape5 Page.Request.Browser.Version returned the value "5.0"> What gave 5.0 ?, can you be more specific ? Page.Request.Browser.Type returned the value "Netscape5" >> 2. ASP.NET did not send any CSS other than the constant part that I Yes, that is exactly what I am saying. The output rendered for the Label >> entered manually in the .aspx file > Are you saying that the in-line styles did not render to Netscape.? 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.4322I 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/articleprint.aspx?quickid=0309091&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. Show quoteHide quote "Terry Burns" <m*@mine.com> wrote in message news:u8mql2gRGHA.1728@TK2MSFTNGP11.phx.gbl... > > > -- > Terry Burns > http://TrainingOn.net > "Nathan Sokalski" <njsokal***@hotmail.com> wrote in message > news:%23rrcjaYRGHA.6084@TK2MSFTNGP14.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.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 >> njsokal***@hotmail.com >> http://www.nathansokalski.com/ >> > > Nathan Sokalski wrote:
> The only way to get around this is by This may interest you:-> 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. "BrowserCaps update for modern browsers, http://slingfive.com/pages/code/browserCaps/ " Andrew 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. Show quoteHide quote "Andrew Morton" <a**@in-press.co.uk.invalid> wrote in message news:OrGfO%23nRGHA.1688@TK2MSFTNGP11.phx.gbl... > 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 >
Need some help with vb StatusStrip Control
How to abort a WinForms apps with no main window [VB.NET] How to store/load XML schema internally... Fields in Access database returned in alphabetical order datagridview combo box latency when loading forms Coding a TimeSpan Best way to implement 2 controls on one window Best value Help file builder Best way to output form information |
|||||||||||||||||||||||