Mobile Development in ASP.NET

I wonder, how easy it is to develop Mobile Web applications using ASP.NET. The beauty of asp.net is, it automatically renders the content based on the requested device. General asp.net code intended to work with desktop browsers like Microsoft Internet Explorer,Mozilla Firefox etc., works absolutely fine in Mobile browsers also. It saves lot of time, without writing separate code for Mobile version of web applications.

NOTE: Mobile Web browsers should be HTML compatible in order to display asp.net web page.

For developing Web applications, which intended for Apple iPhone, with minor additions to the existing page, it will render absolutely fine in the Apple safari [Mobile Browser]. Check the below link for more info.

http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/Introduction/Introduction.html#//apple_ref/doc/uid/TP40002051

For developing Web applications, which intended for BlackBerry Mobile Phones, surprisingly BlackBerry provides Visual Studio plug-in for BlackBerry, to develop web applications for BlackBerry. Check the following link for more info.

http://na.blackberry.com/eng/developers/browserdev/

For Mobile web application, intended to display in Android/Symbian OS, it renders absolutely fine, without any extra additions to the page.

If you want to redirect the user to the Mobile Version website, based on the request, check the following link for more information.

http://mdbf.codeplex.com/

106 Comments

  1. can you tell me can i use visual studio 2010 for mobile web development and how can i use visual studio
    and what is ASP MVC and what are are the use of them

    1. Hi manik,
      Yeah, you can use Microsoft Visual Studio 2010 for developing Mobile web applications. General asp.net web application works absolutely fine with all Mobile browsers[HTML Compatible]. ASP.NET MVC and ASP Web Forms are two styles of asp.net, for developing web applications. The asp.net MVC is typical old HTML coding style, where are ASP.NET Web Forms is like similar to creating Windows Forms. There is no difference in both the styles. You can choose, which ever style you want.
      You can check the following links for more information on Mobile development.
      http://www.asp.net/learn/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application

  2. sir we are students of banasthali university and are developing a website for our college specially for mobile phones. can u please help us by telling us how to use session variable and cookie while developing mobile web forms as we are not able to do error free coding.
    plz help with an eg.

    thank you in advance!

    1. Hi,
      First of all, general asp.net website works absolutely fine in all Mobile browsers[HTML Compatible]. Regarding Cookies, if Cookies are disabled in Mobile browsers, then you cannot use cookies. For Sessions, it uses cookies. If Cookies are disabled, then the session id is stored in the URL. Check the following link for more information on Cookies
      http://msdn.microsoft.com/en-us/library/aa289495(v=vs.71).aspx

      For any other assistance, send a mail to my mail id – cr.reddy@hotmail.com

  3. Hi Roopesh,
    I am new to Mobile web application development and I know how to develop normal web apps using VS2008.
    Can you please tell me where I can get MMIT and how to integrate and develop mobile web apps with VS2008.
    Thanks in advance.
    Ramu Paideti.

    1. Hi Ramu, General ASP.NET applications works absolutely fine in Mobile web browsers, since now a days Mobile browsers are HTML capable. MMIT is designed for WAP devices. You can check my other posts for more information on developing asp.net web apps for mobile devices!

  4. hello
    Thnaks

    i have gone thr’ the link u provided

    in hwich u have stated that a normal asp.net website with some meta tags works well on mobile using some stimulators

    i got a reference to download Microsoft Mobile Internet Toolkit (MMIT) and use it

    i culd not find a link to downlad the toolkit

    2) with the asp.net application i will need to register the domain name & upload the pages

    is there any way that i can just develop it fr mobile applicaton

    1. Hi,
      You don’t need to download Microsoft Mobile ToolKit(MMIT). It is designed for WAP emabled devices. Now a days all mobile devices are HTML capable. so general ASP.NET web application works absolutely fine. If you want more information check my blog posts.

      You can develop ASP.NET web application which can be viewed in Mobile devices.
      http://www.asp.net/learn/whitepapers/add-mobile-pages-to-your-aspnet-web-forms-mvc-application

      Hope it helps u…

  5. Please check http://mdbf.codeplex.com/ [This project is no longer supported and will be removed on October 29, 2010]

    Please take a look at http://51degrees.codeplex.com/. It is an ASP.NET open source module which detects mobile devices and provides auto redirection to mobile optimized pages when request is coming from mobile device. It makes use of WURFL mobile device database. For redirection there is no need to modify existing ASP.NET web application pages.

      1. Hi Roopesh,

        We have created a mobile web application, which runs in blackberry perfectly fine. But to view the same application in apple iphone, do we need any additional change or do we require any sdk to be installed?

  6. Hi Roopesh,

    Can you please help me.. how to develop basic mobile application in asp.net.
    I am new to this.

    Thanks & Regards,
    Bhaskar Rao.Thalatam

    1. Hi,
      General ASP.NET website works absolutely fine in all Mobile web browsers[HTML compatable], by adding some Meta tags. Add the following Meta tags to an exisiting ASP.NET web application to make the website viewing properly in Mobile browsers.

      <meta name="viewport" name="width=device-width;initial-scale=1.5;maximum-scale=5.0;" />
      <meta name="HandheldFriendly" name="true"/>

  7. hi
    can u tell me some thing about mobile specific events like calling a number which is in the content of page , or somehow connection to the phone via web and fire event which is just for mobile
    thanks

    1. Hi,
      You can provide a link, which allows to make a call,Check the following link for more information on that.
      http://www.raizlabs.com/blog/202/iphone-telephone-hyperlinks
      RIM provides some cool stuff with BlackBerry Mobile devices for special taks. Download the Javascript PDF file from this link,
      http://docs.blackberry.com/en/developers/subcategories/?userType=21&category=BlackBerry+Browser&subCategory=&url=%2Fdevelopers%2Fsubcategories%2F&versionId=494

  8. Hi R00ppesh,
    this is an excellent artical,but one think i would like to know how would i access data from code behind aspx.cs pages.as i know iPhone does not support server side pages so how i would access class that are alredy in used in desktop based website.
    this is very urgent.kindly suggest me how i ll do that
    Thanks
    ajay punai

  9. Hi Roopesh,
    I’m facing a problem when already existing website redirected to iphone pages .button click would not responed in iPhone device but it is working absoultely fine in browser.I have a login form which is processed on server when user clicked on it but this is not working on iPhone device.when i click on it on iPhone it would not responed .so i would loke to know why this is happing.Is it true that iphone device support only HTML,JavaScript,CSS not aspx control and its aspx.cs pages??if it is then how i can call server side aspx.cs class data??Should i use javacript to call server side data.Is this work??
    kindly suggest where i’m wrong
    Thanks
    Ajay Punia

  10. Hi Roopesh,
    I have spend 2 week in above post but it’s seem to not working on iPhone.I have existing website and i was redirecting user to iphone specific page when he made request from iphone device.I have added meta teg that you have suggested but button click is not working which i have wrote for server side proccessing.Is aspx.css work on iPhone??or Iphone only support Javascript,Css and Html.
    Kindly guide me if i’m wrong
    kindly reply it’s urgent
    Thanks & Regards

    Ajay Punia

    1. Hi,
      Check whether Javascript option is enabled in the Apple iPhone. All ASP.NET server controls require javascript to be enabled in the requested device. So try enabling Javascript and try again.
      Hope it solves ur problem…

    1. Hi dinhdaica,
      It works absolutely fine in all Mobile browsers[HTML capable]. No need to convert anything. The beauty of ASP.NET is, it renders the content based on the requested device.
      Hope it helps u…

  11. Hi,
    so you tell all the web application run in windows OS, also run in mobile phones,IPHONE, IPOD touch and IPAD.Actually the size of the web application is big in size(both memory size and design).How it will work fine on mobile…Is there any way to see the screens like windows browsers in mobile phones..Please let me know…

    1. Hi,
      Now a days, Mobile devices have HTML browsers, which is capable of rendering large Websites, as it renders in the Desktop browsers. What i mean is, you can take full advantage of ASP.NET Server controls, to achieve the behaviour you want in Mobile Phones too.
      Apple iPhone is compatible with HTML5 and CSS 3, where also Windows Phone 7 is supporting HTML 5 and CSS 3 in IE 9, which you will get throug Mango Update. So websites display normally in Mobile Phones too.
      If you are specific in developing Mobile web apps, you can even do that, with large ASP.NET Server control set.

      Hope it helps u…

  12. Hi Roopeshreddy
    I developed an a pplication using asp.net, I NEED to upload a picture from the Mobile and insert it into my orcal database, plz help me in this issue. It is so urgent and it will be kindly from you to help me as soon as you can, caue i have to include this task to a violation system and it is related to the belling system, it is so critical.

    Thanks alot in advance.

    1. Hi Mohamed Salah,
      Mobile devices doesn’t support uploading files including (Apple iPhone, Android etc.,). By default Upload feature is disabled in those Mobile Phones.
      You can do it from some Nokia Mobile devices.

      Hope it helps u…

  13. Hi Roopeshreddy,
    Thanks alot for replying me.
    What about Handheld devices or phones, will the uploading feature work on it.
    And if not please guid or help me how i can do upload using asp.net technology.
    i just made a simple form that upload picture from mobile and insert it to database table then view it in gride.
    Please try to help me it is so critical and urgent am about to fired 😦

    Thanks alot Roopeshreddy

    1. Hi, I already told you that Mobile devices including Apple iPhone, Android devices doesn’t support file upload feature from web browser, beacuse of various security issues. One alternative is to develop a thick application to upload files. File Uploading works in Windows Mobile 2003/5/6/6.5 and not in 7

  14. And Does the File Uploading works in Windows Mobile 6.1 or not because i checked the handhel operating system and found it Windows Mobile 6.1 , so will the file uploading feature work in it.

  15. Just 1 question, please kindly tell me can i use the google android emulator to test the uploading file aaplication which should work on the handheld which its windows mobile is 6.1 as i told u above???
    and is it a tetster for all different mobiles?

    1. Hi, You cannot usr Google Android emulator, beacuse Android doesn’t support FileUpload feature. So you can test in Windows Mobile 6.0/6.1 emulators.
      Hope it helps u…

  16. Thank you so much Dear Roopeshreddy,
    I ust searched alot for Windows Mobile 6.0/6.1 emulators but did not get any result,
    plz if you can help me in this or if you have Windows Mobile 6.0/6.1 emulators works on windows 7 plz send me the link to download it, all what i found not working on windows 7.
    i just need Windows Mobile 6.0/6.1 emulators can be installed on windwos 7.
    Hope you can reply as soon as possible.

    Thanks alot in advance.

  17. Hi,
    please i need your help urgently.
    I made a website using ASP.NET with VS 2008, and it works well, but i need to access this website using any mobile device such as iPhone as an example.
    what should i add to my website code to be applicable on phone devices ?
    should i add a piece of code in somewhere to refer to device connecting
    or should I’ve to rebuild this website to target a mobile application ???

    please reply me as soon as possible.
    Thanks in advance

    Tasneem Habeeb

  18. disculpe estoy desarrollando una aplicación wap en visual estudio 2005 pero mi interfaz es muy pequeña cada ves que lo veo desde ipot , no se ve como como otras aplicaciones en java en cuales uso estilos para que se vea en pantalla completa , la verdad estoy desesperado quiero saber como hacer que en esta vercion se vea mi aplicación en pantalla completa solo tengo 2 semanas para presentar mi proyecto de tesis y eso lo único que me falta me aria un gran favor si me pudiera decir ya veo que es gran conocedor del tema

  19. Hi Roopesh,

    I need to develop applications for hand-held devices like industrial safe PDA’S.

    Can u please tell me or provide links for these type of development using .net.

    I am very much familiar with windows phone7. Is there any environment to produce WP7 based PDA apps.

    Please reply me as soon as possible.
    Thanks in advance

    Ramu Paideti

    1. Hi Ramu,
      First of all you need to decide, what kind of application you want to develop – Web Application or Thick Applicaton(which can be installed on device). Though you are familiar with Windows Phone 7, you can try developing WP7 app which can be installed on Windows Phone devices!
      http://create.msdn.com/en-US/
      If you are planning a web application which can be viewed in a web browser, then my blog posts will helps u and also you check http://jquerymobile.com, http://www.phonegap.com etc.,
      Hope it helps u…

      1. Hi,Roopesh,

        I need to develop applications for Personal Digital Assistants (PDA)s,then how to take initiation by using .net environment.

        Thanking you

      2. Hi Ramu,
        You mean PDA’s is WindowsPhones??? If yes, then you can take advantage of Microsoft.NET framework to develop applications. For more information on developing apps for WindowsPhone check the below link!
        http://create.msdn.com
        If you mean PDA’s is Windows Mobile 5/6/6.5 – those versions are depreciated!

        Hope it helps u…

  20. Dear Sir ma name is Samed and i live in Ghana..am a computer science student……am a beginner and would want to study mobile apps but i do not know how to start?

  21. Hi Samed,
    Mobile Apps – What type of apps – Thick Applications(which can be installed on the phone) OR Web Apps – which can be accessed from the Web browser!
    If you are interested in thick apps, you need to develop using their Platform SDK’s. Now a days all platforms provide SDK’s to develop apps and also Marketplaces to sell them!
    If you are interested in Web Apps, you need to decide which platform you are interested? You can develop web application in Microsoft platform/Java/Php etc.,
    Hope it helps u…

  22. hello,
    i am creating a site fo mobile with seprate sub domain ,now i have some issues
    1. if any user open site like http://www.google.com on mobile then how to redirect to http://www.m.google.com
    coz my mobile site on http://www.m.google.com (like this) space
    2. How to get user mobile gps location by mobile site
    3. I have install the window phone 7 sdk in my system so whats a use for this simulator
    Thanks
    I hope you get my questions
    Thanks

  23. Hi Roopeshreddy , Its really a gud article. Here i have one query can we create a voice dial-er application. could you please let me know if any possibilities to create one. i would like to create Thick Applications(which can be installed on the phone).

      1. Thanks a lot for u reply, Here i do understand that we need to buy API’s.
        Link was really good Roopesh. Appreciate for your help

    1. Hi,
      You can’t have onmouseover event in Mobile browsers, since there is no cursor/pointer! So what you can do is onclick display submenus instead of mouse over!

      Hope it helps u…

      1. That was a masterpage menu linked to a css file. I guess the css is the culprit. Any tips on how to modify it?

  24. Hi Roopesh,

    You articles are really an eyeopener, lot of knowledge acquired just by reading them, thanx for your great effort.
    Ok let me put my query accross, i am planning to develop a mobile website using ASP.Net, HTML,CSS, Javascript. I am researching on weather “web clip for IPhone” kind of features can be developed for other mobiles, like Blackberry, Android phones etc..etc…
    If yes then please guide me with your insight, or if you can provide an appropriate url where i can learn how to do.

    Appreciate your early reply
    Regards
    Aji Mathews

      1. Hi Roopesh,

        Thank you for your immediate revert and the url provided.
        Actually i guess you have missed my question, i am putting it once again,
        My question was: weather “web clip for IPhone” kind of features can be developed for other mobiles, like Blackberry, Android phones. If yes then how to go about.

        Regards
        Aji Mathews

  25. Very good written information. It will be valuable to anybody who usess it, including me. Keep up the good work – i will definitely read more posts.

  26. Hi Roopesh,
    I am developing a mobile website that includes image uploading as well. For iPhone I used PickUpAPp and is doing successfully but i am not getting any help on ANdroid.

    I am using .Net MVC. Plese provide me your help.

  27. Roopesh,

    As you state our .Net web applications generally work well in all browsers on all devices except for the AJAX ReorderList. The drag and drop does not work on small touchscreen devices as when you click to drag, the whole window moves instead of just the list item. Do you have a suggestion as to how to fix this or an alternative that could provide this functionality? Thank you!

    1. Hi,

      I’m also looking for the solution. Moreover, in my view Drag n Drop is not much suited for Mobile web apps! May i know how your r implementing this functionality in Mobiles.

      Thanks & Regards
      Roopesh Reddy C

      1. Our drag and drop is not working on mobile either, we are looking for a solution and had hoped you had one 🙂

  28. hi sir can you plz suggest me some basic links for developing mobile website(asp.net web forms) using “jquery mobile”.i developed my asp.net web forms desktop website how can i use “jquery mobile” to convert it into mobile web??

    1. Hi,
      I’m planning to write a blog on using jQuery Mobile API’s! I will get back to u on this soon!

      Moreover, general ASP.NET web app works absolutely fine in all Mobile browsers! You can add the VIEWPORT meta tag to make mobile compatible!

      Mean while, if i found any cool links, i’ll let u know!

      Thanks &Regards
      Roopesh Reddy C

      1. sir can you please share some links for mobile detection and redirection.i used 15degree but its not work for me. 😦

      2. sir how can i insert data from my asp.net mobile website(jquery mobile) into sql database???

      3. Hello,
        you can create a mobile website in vs2010 coz jquery mobile provide full support with Rozar webpage . So you can connect your mobile site and do all thing .
        just add the meta tag for device this meta tag maintan your site for all device browser

    1. Hi Rajeswaran,

      There is no separate way of creating Mobile web applications. It’s just like normal web applications!

      Create a normal ASP.NET web application, and insert the following META tag in the HEAD section!

      I suggest you create your mobile web applications using ASP.NET MVC, which is light weight and best suits for Mobile web app development!

      For controls, you can check jQuery Mobile –

      For more clarification, feel free to reply!

      Thanks
      Roopesh Reddy

  29. Does your website have a contact page? I’m having trouble locating it but, I’d like to
    shoot you an e-mail. I’ve got some suggestions for your blog you might be interested in hearing. Either way, great website and I look forward to seeing it grow over time.

  30. sir we are working on wireless oximeter,we need to develop c# application having Bluetooth handshaking protocol please guide us and give any link related to it

  31. Hi,
    I was curious, how an asp.net page will get rendered on Android or IOS because on desktop it is hosted in IIS. I have not tried but i was thinking, which file i will open or run? What if its an app?

    1. Hi Rajesh,
      You can always access the website in Mobile browser. Now a days mobile browsers are capable of rendering HTML 5 content. So, the existing ASP.NET websites should be working fine in Mobile browsers as well.

      If you wish to have a separate website for Mobiles, then you can do that as well. Check http://www.asp.net/mobile for more info

  32. An outstanding share! I’ve just forwarded this onto a friend who has been doing a little homework on this.
    And he in fact bought me lunch due to the fact that I discovered it for
    him… lol. So let me reword this…. Thanks for the meal!!
    But yeah, thanx for spending time to talk about this matter here on your website.

  33. Do you mind if I quote a few of your articles as long as I provide credit
    and sources back to your website? My blog site is in the exact same niche as yours and my users would really benefit from some of the information you provide here.
    Please let me know if this alright with you.

    Thanks a lot!

  34. Sir i want to make a website but problem is today every website open in Desktop, mobile and tablet but when i create and open my website in mobile or table when it show me like desktop web page so please you can tell me how to make mobile compatible website in asp net.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s