Hi Mark,
Afaik all of the browser capabilities are extracted from the
http
headers sent by the client to the server. Asp.net 2.0
contains a very
powerful technology to accomplish this using a set of
regular
expressions, applied to the aforementioned headers: you
could access the
code for each one of them (and add you own, if needed) in
the
\v2.0.50727\CONFIG\Browsers folder, checking out every
.browser file.
You should see that ScreenPixelsWidth/Height is available
only for a
small set of known user agent, namely Treo600 and other
mobile devices
which, in fact, send these informations embedded in one of
the http
headers they use. To extract those values from the browsers
not
supported by this mechanism you should use javascript, if
available.
HTH
Efran Cobisi, cobisi.com
Mark Kucera wrote:
> Has anyone had any luck w/ using Request.Browser in
ASP.NET 2.0?
> Specifically the Request.Browser.ScreenPixelsHeight,
> Request.Browser.ScreenPixelsWidth don't seem to return
correct results.
> When I check these values they just report 640x480
which is not my
> current resolution (1600x1200). I tried it in FireFox
and IE so it
> doesn't appear to be a browser issue. Is there
anything I can do to
> make these properties return correct values? I tried
to google for this
> info, but surprisingly there isn't much out there...
>
> Thanks for any insight you can provide.
> MK
>
> ===================================
> This list is hosted by DevelopMentorŪ http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>
===================================
This list is hosted by DevelopMentorŪ http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
|