Welcome to MSDN Blogs Sign in | Join | Help

Visual Web Developer Team Blog

Your official information source from the Visual Web Developer team.

News

  • These postings are provided "AS IS" with no warranties, and confer no rights. Use of included code samples are subject to the terms specified Terms of Use
Tip/Trick: Using Mobile Web Forms with Web Application Projects

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

Posted: Tuesday, January 09, 2007 3:20 AM by WebDevTools
Attachment(s): Mobile Web Form Templates for WAP.zip

Comments

Ahmad Zayed said:

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.

# January 9, 2007 3:07 AM

Public Sector Developer Weblog said:

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

# January 9, 2007 9:36 AM

Public Sector Developer Weblog said:

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

# January 9, 2007 10:00 AM

Ahmad Zayed said:

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

# January 10, 2007 1:26 PM

WebDevTools said:

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

# January 10, 2007 6:48 PM

Ahmad Zayed said:

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.

# January 11, 2007 1:32 AM

WebDevTools said:

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.

# January 11, 2007 1:45 AM

Rune said:

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

# January 17, 2007 7:41 AM

WebDevTools said:

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

# January 17, 2007 11:31 AM

Sebi said:

Hi

This is very useful. Thanks a lot!

# January 31, 2007 7:51 AM

Reeba said:

very useful. thanks

# February 7, 2007 8:06 AM

using Colin.Bowern; said:

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

# February 11, 2007 9:52 PM

using Colin.Bowern; said:

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

# February 11, 2007 9:55 PM

A Yousfi said:

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

# March 9, 2007 10:38 PM

Andreas said:

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.

# March 15, 2007 10:02 PM

WebDevTools said:

Hi Andreas,

There are some samples here:

http://samples.gotdotnet.com/mobilequickstart/(S(x35orw55rv54om552ovq55ni))/Default.aspx

# March 26, 2007 6:52 PM

shiva said:

great its working nice thanks a lot

# March 27, 2007 4:14 AM

yash said:

i want to add css on mobile form , i want to add images in mobile form background.How i can do it

# April 17, 2007 2:22 AM
New Comments to this post are disabled
Page view tracker