BrowserCaps

J

Jim_tvm

I'm very new to web development using ASP.NET. I'm developing a site
using ASP.NET. My site looks fine if you use IE but if you open it in
NS it's not displaying properly. And this display will very for
different versions of NS also.

Finally after a long search I found some article about browserCaps for
machine config. I was not in a position to use this technique. i.e.,
modifying the machine config, (even though it's not working in my own
system) coz I'm going to upload the things in a remote server and I
have no other option other than uploading the things. So the option
left for me is to modify the web.config file. I copied the Netscape
section from browsercaps of machine config to the web.config. But
still it's not working.

Is it due to any version issue? My current asp.net version is 1.1.

These are the links I refered

http://www.codeproject.com/aspnet/browsercaps.asp
http://www.garykeith.com/browsers/
http://www.cyscape.com/browsercaps/

please helps me in this issue.
Thankx in advance
jim
 
J

John Bilbo

Hi,

It's because your HTML is not W3C Compliant.
For more information on how to display properly HTML visit
http://www.w3.org/TR/html4/
Beware of the HTML and CSS generated by VS.NET.
You can validate your HTML pages here http://validator.w3.org/

Hope this Helps!
Franck Quintana.

| I'm very new to web development using ASP.NET. I'm developing a site
| using ASP.NET. My site looks fine if you use IE but if you open it in
| NS it's not displaying properly. And this display will very for
| different versions of NS also.
|
| Finally after a long search I found some article about browserCaps for
| machine config. I was not in a position to use this technique. i.e.,
| modifying the machine config, (even though it's not working in my own
| system) coz I'm going to upload the things in a remote server and I
| have no other option other than uploading the things. So the option
| left for me is to modify the web.config file. I copied the Netscape
| section from browsercaps of machine config to the web.config. But
| still it's not working.
|
| Is it due to any version issue? My current asp.net version is 1.1.
|
| These are the links I refered
|
| http://www.codeproject.com/aspnet/browsercaps.asp
| http://www.garykeith.com/browsers/
| http://www.cyscape.com/browsercaps/
|
| please helps me in this issue.
| Thankx in advance
| jim
 
E

Eirik Eldorsen

Put the following code in the bottom of web.config before the </system.web>
tag


<!-- 2003-12-03, Rob Eberhardt -
http://slingfive.com/pages/code/browserCaps/ -->

<browserCaps>
<!-- GECKO Based Browsers (Netscape 6+, Mozilla/Firebird, ...) //-->
<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)?
(?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">
browser=Gecko
type=${type}
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:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=${major}
minorversion=${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>

<!-- AppleWebKit Based Browsers (Safari...) //-->
<case
match="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))">
browser=AppleWebKit
version=${version}
majorversion=${major}
minorversion=0.${minor}
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="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))(
\(KHTML, like Gecko\) )?(?'type'[^/\d]*)/.*$">
type=${type}
</case>
</case>

<!-- Konqueror //-->
<case
match="Konqueror/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'));\w*(?'platform'[^\)]*)">
browser=Konqueror
version=${version}
majorversion=${major}
minorversion=${minor}
platform=${platform}
type=Konqueror
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>

<!-- OPERA 5+ //-->
<case match="Opera[
/](?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
browser=Opera
type=${type}
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:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=${major}
minorversion=${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>

</browserCaps>
 
F

Franck Quintana

I don't understand this XML node.
Is it a special node used to make an ASP.NET code compatible?

Thank you.
Franck Quintana
 
E

Eirik Eldorsen

Yes, it makes ASP.NET code work in Firefox, Opera, Safari, Knoquerer, WebTV
etc. Without it, the code only works in IE and Netscape 4 and 6. All other
browsers will be treated as IE 3.
 
J

Jim_tvm

Thankx for your help.i tried with the browsercaps things which you
provided. but still i have the same issues with images and the style.
i think the % things are not taking by down level browsers. What to
do?

With regards
Jimmy
 
J

Jim_tvm

Thankx for ur helps and links.as u said i checked my site with the
link which u provided but the thing is it's showing error for the
things like not specified the alt for an image something like that.
According my knowledge we can make the things perfect by making some
compromises in style and attributes we specified for the tags. But if
we have some solutions like browsercaps it's very useful.

Thanku very much
With regards
Jimmy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top