---
title: "Mobile support in asp.net 4.0"  
description: "Some common properties which is useful while you are developing mobile devices using asp.net 4.01)Detect it is mobile device or not: We can use Reques"  
author: "Anonymous User"  
published: 2011-05-21  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/180/mobile-support-in-asp-dot-net-4-0  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Mobile support in asp.net 4.0

Some common [properties](https://www.mindstick.com/articles/23331/nootropics-7-different-types-and-their-unique-properties) which is useful while you are developing [mobile devices](https://yourviews.mindstick.com/view/85524/influence-of-mobile-devices-on-travel-and-tourism-experiences) using asp.net 4.0

**1) Detect it is [mobile device](https://www.mindstick.com/articles/12967/portable-reporting-systems-and-mobile-device-management) or not**: We can use Request.Browser.IsMobileDevice [property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) to check source of request that it is [coming from Mobile](https://www.mindstick.com/forum/34265/traffics-are-not-coming-from-mobile-device) device or by computer. This property is useful when we develop such type of [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) which is accessible by mobile devices [as well as](https://www.mindstick.com/interview/2481/can-you-write-a-java-class-that-could-be-used-both-as-an-applet-as-well-as-an-application) computers.

**2) Retrieving mobile device manufacture:** We can use Request.Browser.MobileDeviceManufacture to [retrieve](https://www.mindstick.com/forum/34400/how-to-retrieve-form-values-in-controller-action) device manufacture name.

**3) Retrieving mobile device model:** We can use Request.Browser.MobileDeviceModel to retrieve mobile device model name.

**4) Retrieve screen pixel width :** We can retrieve [mobile screen](https://answers.mindstick.com/qa/114715/what-impact-does-mobile-screen-size-have-on-battery-life-and-usability) width by using Request.Browser.ScreenPixelsWidth property to retrieve width of mobile screen.

Example which represent these properties

```
protected void Page_Load(object sender, EventArgs e){        if (Request.Browser.IsMobileDevice)   //Check whether request comes from mobile device        {            Response.Write("This request comes from mobile device.");            Response.Write("Mobile device manufacture   :  " + Request.Browser.MobileDeviceManufacturer + "<br />");    //Writing mobile device manufacture.            Response.Write("Mobile device model  :  " + Request.Browser.MobileDeviceModel + "<br />");         //Writing mobile device model name.            Response.Write("Screen Width  :  " + Request.Browser.ScreenPixelsWidth + "<br />");               //Writing screen pixel width.            Response.Write("Screen Height  :   " + Request.Browser.ScreenPixelsHeight + "<br />");            //Writing screen pixel height.        }}
```

---

Original Source: https://www.mindstick.com/blog/180/mobile-support-in-asp-dot-net-4-0

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
