Screen Width

  • Thread starter Thread starter Ken Cooper
  • Start date Start date
K

Ken Cooper

Hi,

Is it possible to determine users screen width in ASP.NET?

I have tried Request.ServerVariables("HTTP_UA_PIXELS") but this returns
nothing.

I am being pointed in the direction of Request.Browser.GetConfigCapabilities
but don't know what configKey to use. Is this an unfinished and undocumented
feature in the framework or is there some real help available somewhere?

Some important design decisions need to made about our site but these depend
on the screen resolutions being used by our visitors. How common is 800x600
now??? Can we "harvest" this information without asking users to complete a
survey form?

Many Thanks,

Ken

k.a.cooper___[at]___shu.ac.uk
 
You'll find some stats at :
http://www.w3schools.com/browsers/browsers_stats.asp

You could also collect this on your own web site using the client-side
screen object (and posting these values in hidden fields for example).

Of course, it should be used only to make decisions about the global design.
IMO it shoudn't be used as an attempt to dynamically adapt each page to the
current resolution (HTML does quite a nice job at this when working with
relative units).

Patrice
 
This is excellent Patrice, the stats save me doing the excercise.

Many Thanks,

Ken


Patrice Scribe said:
You'll find some stats at :
http://www.w3schools.com/browsers/browsers_stats.asp

You could also collect this on your own web site using the client-side
screen object (and posting these values in hidden fields for example).

Of course, it should be used only to make decisions about the global design.
IMO it shoudn't be used as an attempt to dynamically adapt each page to the
current resolution (HTML does quite a nice job at this when working with
relative units).

Patrice

--

Ken Cooper said:
Hi,

Is it possible to determine users screen width in ASP.NET?

I have tried Request.ServerVariables("HTTP_UA_PIXELS") but this returns
nothing.

I am being pointed in the direction of Request.Browser.GetConfigCapabilities
but don't know what configKey to use. Is this an unfinished and undocumented
feature in the framework or is there some real help available somewhere?

Some important design decisions need to made about our site but these depend
on the screen resolutions being used by our visitors. How common is 800x600
now??? Can we "harvest" this information without asking users to
complete
a
survey form?

Many Thanks,

Ken

k.a.cooper___[at]___shu.ac.uk
 
Back
Top