Starting to build web applications for mobile devices (any phone).
What would be the best approach using ASP.NET 3.5/ASP.NET 4.0 and C#?
UPDATE (feb2010)
Any news using windows mobile 7?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends if you really want to support every cell phone or only high end or new phone like the iPhone which don’t have many limitations rendering web pages. If you could ask for real HTML rendering, Javascript and cookies support on the phone as requirement, then the real constraint is the limited size of the screen. You should do fine with ‘normal’ web development in ASP.NET taking care to the the size of the pages.
If that is the case, you could stop reading here.
If you really want to support every cell phone, especially old ones, you should be aware that there are different types of phones. Many of them have limitations and constraints showing web pages. Some of them can use JavaScript, but many of them do not. Some of them can display HTML content, but many others can not. They have to rely on the ‘Wireless Markup Language’ standard for accessing web. So, it’s not easy to build a website that supports all of these different devices.
Here are some links to general content (not ASP.NET specific), which could help getting the whole picture:
Their main limitation however is, as I already mentioned, the smaller screen than on normal PC’s. And many cell phones do not support JavaScript, Cookies and some even don’t show images.
There are special markup standards for cell phones. WML pages is for example a widely adopted standard for cellphones. WML stands for ‘Wireless Markup Language’ which is based on XML. You can find a description and reference of WML here on w3schools.com.
The code below shows a sample WML page:
The good news is, that ASP.NET renders WML (and other mobile markup standards) content automatically. You don’t have to write WML files yourself. A built-in mechanism detects the type of device (cell phone) of the web requests. However, mobile device detection on ASP.NET does not work correctly for some (newer) devices. Take a look at WURFL, an XML configuration file which contains information about capabilities and features of many mobile devices.
You can test the pages you develop in ASP.NET in a standard web browser, but it would not give th right picture of what you have developed. There are some emulators available for this problem, which simulate a cell phone on your desktop computer. There is a Microsoft support article which explains where you can download them.
ASP.NET Mobile Controls
The ASP.NET Mobile Controls, formerly knowns as the ‘Microsoft Mobile Internet Toolkit’ extend the .NET Framework and Visual Studio to build mobile Web applications by enabling ASP.NET to deliver markup to a wide variety of mobile devices.
The ASP.NET mobile controls render the appropriate markup (HTML 3.2, WML 1.1, cHTML, XHTML) while dealing with different screen sizes, orientations and device capabilities.
Learn more here on the official web site.