Tip/Trick: Using Mobile Web Forms with Web Application Projects

Tip/Trick: Using Mobile Web Forms with Web Application Projects

  • Comments 18

Hopefully, people reading this post are familiar with the "Web Application Projects" feature that was added to Visual Studio 2005 in Service Pack 1.  If you are using Web Application Projects, you might have noticed that it doesn't have item templates for ASP.NET Mobile Web Forms (which were previously available in Visual Studio 2003).  

To help users with this scenario, I've created the following item templates for Web Application Projects in VB and C#:

  • Mobile Web Form
  • Mobile Web User Control
  • Mobile Web Configuration File

Once installed, these templates enable users to create and edit new ASP.NET Mobile Web Forms using Web Application Projects, similar to how one could in Visual Studio 2003.

To install these templates download the attachment included in this post, and follow the instructions in the included readme.txt file. 

Once you have installed the templates you should see the following items in the "Add New Item" dialog:

 

Hopefully folks doing Mobile Web Forms development will find this useful!

Omar Khan
Group Program Manager
Visual Studio Web Tools

Attachment: Mobile Web Form Templates for WAP.zip
Leave a Comment
  • Please add 1 and 7 and type the answer here:
  • Post
  • Thanks

    Actually, I'm studding course about Mobile Web App. and it's very fun.

    I have two question, do you know how to pass the URL to PC Mobile Emulator without typing it.

    Is ASP Users and Membership works with Web Mobile App. because I tried but every time when I make redirect to HomePage.aspx e.g. I still get USER Object empty and the IsAutenticated property always false

    Thanks a lot again.

  • Are you are building web sites for mobile devices? Did you install Visual Studio 2005 SP1 and tried to

  • One of the many WPF blogs I follow is www.thewpfblog.com . Lee just blog'd about a new site at www.contentpresenter.com

  • Yes, I tried with SP1 and nothing happened. In fact, I build my own database and classes but it bother me that I couldn't use ASP.Net built-in Membership. I don't know why it didn't work on ASP.Net Mobile Page and worked fine on ASP.Net Page.

    By the way, I paste the files in : C:\Documents and Settings\[UserName]\My Documents\Visual Studio 2005\Templates\ItemTemplates\Visual C# but it didn't appear in New Item dialog box.

    Thanks in advance

  • Hello Ahmad,

    The attached zip contains 6 additional zip files within it.  You should expand the zip in this attachment.  But you should not expand the zip files it contains.  Just copy those zip files w/o expanding into the location you describe.  If that still doesn't work let me know: omark-at-microsoft-dot-com.

    --Omar

  • Yes, I don't unzip the six files within the Main zip file I just copy them to that location for C# files.

    Sorry, I don't notice anything new in New File Dialog.

  • Hello Ahmad,

    Are you trying "New File" dialog, or "Add New Item" dialog?  These files only show up in the "Add New Item" dialog.  Please send me email at omark-at-microsoft-dot-com if you still have trouble installing these.

  • Same here. I've followed your instructions. But the templates do not appear.

  • Hi Rune,

    When looking into the issue Ahmad reported, we discovered he was looking at the "Add New Item" dialog in a "Website" project, not a "Web Application Project".  Website projects already have mobile form templates, so these do not apply to that project type. These templates are only for the "Web Application Project" type.  To do a Web Application Project you should select 'File > New Project' from the menu and then select "ASP.NET Web Application" as the project type.  In that project selecting "Add New Item" hopefully should show the templates as pictured in the post.  Email me at omark-at-microsoft-dot-com if that doesn't work for you.

    Thanks,

    Omar

  • Hi

    This is very useful. Thanks a lot!

  • very useful. thanks

  • Before We Begin... I think it is fair to say that almost everyone today in the modern societies have...

  • The attached Mobile Web Application Project and Item Template collection is an adaptation of Omar Khan's...

  • This works great. I've been asking for this for a while now. Good timing as I'm back working on Mobile Web Apps again.

    -A Yousfi

  • Newbie question. Are there any website sample projects available to get started with mobile web forms development? I'll have to develop a small web application for Pocket Internet Explorer. Thanks.

Page 1 of 2 (18 items) 12