Mobile Screen Size

A

Alex Maghen

Hi. Is there ANY kind of standard location in Request.ServerVariables (or
anywhere else in the HTTP Header) where I can get the requesting phone's
ScreenWidth and ScreenHeight? Is there *any* kind of standard in this?

Alex
 
S

Steven Cheng[MSFT]

Hello Alex,

Thank you for posting.

As for Modile device's screenSize, do you mean the webbrowser's screen Size
on the certain client device? Based on my experience, there won't have such
http headers in normal http web requests. And as for web application,
generally it will use the "UserAgent" http header to identify the
client-side browser/device, and it will have a certain device list in the
local database so that it can query out the certain device's capabilities
information according that useragent http header value. The capabilities
available depend on the local device setting database, in ASP.NET, it
provide a device capabilities collection on the page request object, we can
use it to query the info we want.

#Mobile Device Capabilities
http://msdn.microsoft.com/library/en-us/mwsdk/html/mworimobilecapabilities.a
sp?frame=true

For example, in ASP.NET Mobile page, we can use the following code to dump
all the available capability items:

=====================
foreach (string key in Request.Browser.Capabilities.Keys)
{
Response.Write("<br/>" + key + ": " +
Request.Browser.Capabilities[key]);
}
=====================

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
S

Steven Cheng[MSFT]

Hey Alex,

How are you doing on this issue, does the information in my last reply
helps you a little? Please feel free to post here if there is anything else
we can help.

Regards,

Steven Cheng
Microsoft Online Community Support


==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.



Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top