Is there a way using purly ASP to determine a users screen size. I don't want to use any third party scripts etc... and I don't want to use javascript Im just want to know if ASP can handle this and how if possible
Thanks in advance
ASP is server-side script, this means that it doesn not know anything about the client browser except what the client browser sends it. Basically if it is not in the ServerVariables collection, the server doesn't know it.
What you can do is use client-side scripting to capture these values and then submit them back to the server and let the server stroe them in either cookies, or session variables, or something like that. But without client-side scripting you can't get that information.
-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
I had to double check to be sure, but the browscap dll basically takes the http header information from a web page request and then compares it against entries in a text file (browscap.ini). This allows you to have a reasonable guess as to what the client can support, but does not actually contact the client to find out what they do support. In other words someone connecting to your web page with IE6 will check off as having javascript support, but there is no way of telling (without going to the client) whether they have turned it off or not.
You will need to find a private copy of the browscap.ini file as they are not kept up to date by MS and generally since no two copies are alike you should be careful where you get it from. You could also look into browserhawk which has components to do all the work for you and actually figure out what the user has support for, screen resolution, etc.
On the upside, if anyone hits your site with one of the newer handhelds sporting the latest windows platform for handhelds, they generally transmit their screen resolution right in the http header, which is extremely handy.
-Tarwn ________________________________________________________________________________
Want to get great answers to your Tek-Tips questions? Have a look at faq333-2924
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.