R – What Happened to ASP.Net Mobile Web Forms

asp.netmobilewebformsnet

Previously Visual Studio had templates for mobile web forms (not the mobile SDK). They appear to be gone in Visual Studio 2008 and the only solution I've seen is to download some templates from Omar here:

http://blogs.msdn.com/webdevtools/archive/2007/09/17/tip-trick-asp-net-mobile-development-with-visual-studio-2008.aspx

Is this supported anymore and if so is this the supported solution?

Best Answer

I thought I'd come back to answer this. The mobile forms controls are still there and the templates provided unofficially above are the only ones available that I've found. I'm not sure why they took them out in Visual Studio 2008.

Without the templates, you mostly you just need to change your pages to derive from MobilePage instead of Page and your controls to derive from MobileUserControl instead of UserControl. To access the controls in markup, reference the mobile namespace like this:

and then you will be able to use the mobile controls like this:

mobile:form, mobile:textview ...

These are still the only way that I've found to create pages that are compatible with older phones and browsers. Newer phones and browsers of course use standard HTML for the most part and pages can be created the same as any other ASP.Net page.