473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Screen Width

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
Nov 18 '05 #1
2 1982
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" <_k.a.cooper_@_shu.ac.uk_> a écrit dans le message de
news:uH****************@TK2MSFTNGP10.phx.gbl...
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


Nov 18 '05 #2
This is excellent Patrice, the stats save me doing the excercise.

Many Thanks,

Ken
"Patrice Scribe" <no****@nowhere.com> wrote in message
news:u0****************@TK2MSFTNGP11.phx.gbl...
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" <_k.a.cooper_@_shu.ac.uk_> a écrit dans le message de
news:uH****************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Laura | last post by:
Hello, Newbie question: Does anyone know how to dynamically set the screen width in an applet? I have an applet that creates a horizontal bar menu on a webpage, and I would like the width to be...
6
by: mgandra | last post by:
What is best way to find browser screen width using javascript that is compatible with all types of browsers.
18
by: DavidS | last post by:
Have resW=screen.width; resH=screen.height in javascript. How can I read these values in ASP.NET source code - Page_Load function of code behind? Any suggestions?
6
by: wiewel | last post by:
hi all, i have a strange problem when trying to set up a horizontal menubar: i would like to split the whole screen from left to right into 9 pieces. the first one has a fixed width of 186px....
14
by: Seige | last post by:
Ever had headache when you can't resize the background width using CSS: body{ background: url(/images/bg.jpg) ; background-width: 800px; } It won't work, would it? Of course not, it's not even...
9
by: Steve Wright | last post by:
Hi I'm developing a webpage that needs to include a different stylesheet depending on the screen resolution. I know that I could read the resolution in javascript and then do some sort of...
11
by: srini | last post by:
Frens, I am trying to get screen resolution of the client machine using javascript and use those values in my project. I looked at some of the examples given in this group, i tried to implement...
3
by: Safalra (Stephen Morley) | last post by:
(Note: I'm not trying to do anything stupid based on the user's screen size - I'm just curious.) At work today I was looking at the visitor statistics for a client website, and noticed that...
1
by: nasima khan | last post by:
Hi, i am nasima. I have got a code for setting the screen resolution of my page, but i am unable to understand. Can any one give a complete data explanation of the below code. Sub ChangeRes(X...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.