Thursday, 2 August 2012

Add Mobile Pages to ASP.NET Web Forms.


These are the resolution for Mobile
DeviceScreen res (height x width)
iPhone 320 x 480
iPhone 4 320 x 480 (scaled by a factor of 2)
Nokia N97 360 x 640
HTC Legend 320 x 480
LG eXpo  480 x 800
There are Tips for Designing Mobile websites.. resolution and capablities.
I've Answer how to detect device and Redirect Page to Mobile
You need to understand.. UserAgent you can use this

Refference

Redirect Mobile Devices

<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "mobile.html";
}
//-->
</script>

For iPhones/iPods Specifically

<script language=javascript>
<!--
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
   location.replace("http://url-to-send-them/iphone.html");
}
-->
</script>
Or u can use Page_Load
HttpBrowserCapabilities Version = Request.Browser;
if ( Version.IsMobileDevice = true)
{
 Response.Redirect("yourPage-forMobiles.aspx");
}
e;se{
 Response.Redirect("yourRealPage-For-PC-Users.aspx");
}
Good Luck`

3 comments:

Edward Razek said...

Automation, Mobile Development, Web Development, Custom Software Development and Robot Applications
http://serfcompany.com/

judy zell said...

We are leading exhibition stand designers and builders based in saudi-arabia. We are involved in designing the exhibition booth and marketing display stalls for running trade fairs, marketing campaigns, promotional events, presentations in various saudi-arabia trade fairs.
exhibition stand

judy zell said...

We are leading exhibition stand designers and builders based in kuwait. We are involved in designing the exhibition booth and marketing display stalls for running trade fairs, marketing campaigns, promotional events, presentations in various kuwait trade fairs.
exhibition stand

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More