Thursday, December 14, 2006

Hi folks,

I hope everything good.



I would like to write about how to build an ASP.Net Mobile Application.



First of all, tools you need:


  1. Microsoft Visual Studio 2005.

  2. Pocket PC Emulator (Check on It while you install MVS).

  3. ActiveSync 4.2


Now, after installation:


  1. Open MVS.

  2. File -> New Web Site-> Empty Web Site

  3. Choose the location and choose your programming language and then OK.

  4. Create new Mobile Web Page:


    1. File -> New File -> Mobile Web Form

    2. Name : FirstPage.aspx

    3. Okay


  1. Now you notice that there is a new Toolbox called “Mobile Web Forms”.

  2. Click and Drag a Label control to the Form in the Design Mode.




  1. Now write “” in Text property.

  2. Save all.

  3. And Right-Click on the page and select “View in Browser”.


You have to see the page in IE.




Now, how can I run and test the page on Pocket PC Emulator?


Actually, this is easy:


  1. Tools -> Microsoft Device Emulator.


Note: if you don’t have it maybe you don’t have a combatable framework. But if you install MVS and install this tool with it you have to find it under X:Program FilesMicrosoft Device Emulator.


  1. Click on the emulator you would like to run and choose Connect.

  2. After a green arrow appear chose cradle.



  1. Notice that now there are some “cable” picture this is mean that the device is connected but not with ActiveSync and if you try to test a page you will get error.



  1. To solve this problem, you have to click on ActiveSync and choose Connection Settings.



  1. Now in the connection Settings dialog make sure that you enable connection to DMA and the choose that this computer is connected to “The Internet”

  2. Click on Connect.



  1. You can see now there is a connection between ActiveSync and PPC Emulator.



  1. Now you have to open PPC IE.

  2. And write the page URL with the following format


http://ComputerName_OR_IP:PortNumber/TheRestOfUR

  1. And press Go




Happy programming.



0 comments:

Post a Comment