asp.net
Before I begin to explain how to program, I'll explain how to use the emulator to browse asp.net mobile Web pages. Because different mobile devices have a big gap in the level of support for ASP.net mobile programs, the results show differently. Here I will use two different simulators to display the mobile page, in the actual development process also pay attention to ASP.net mobile Web pages in different devices display effect.
Now we compile the example shown in the previous section directly in Visual Stduio , which will automatically use IE for page rendering with the following effect:
The simulator used in the process of development is Openwave V7 and
Visual StudioA Pocket PC emulation device with its own. Openwave V7 can be in
http://developer.openwave.com/dvl/tools_and_sdk/phone_simulator/Page for download (user registration required, but the simulator is free).
After downloading and installing, open the Openwave V7 Simulator, the interface appears as follows:
In the address bar of the left window, enter the mobile page URL generated by Visual Stduio 2005, which is the effect shown by the Openwave V7 emulator:
The Openwave V7 Emulator Console window on the right displays information about the page, including the URL of the mobile page, the generated WAP file, and the IP and port on which the server resides. For details, please refer to Openwave V7 's Help file, which is not described in detail.
After you've covered the steps of Openwave V7, I'll explain in detail how to use the Pocket PC's own IE to browse the generated
asp.netPage program. Since we're using simulators instead of actual Pocket PC devices, the simulator has to be networked through your computer instead of being networked via GPRS like the actual device. To do this we have to download a Microsoft-provided sync software ActiveSync that allows you to connect mobile devices and PCs using cable, cradle, Bluetooth, or infrared, and create a sync relationship between the two. ActiveSync can be http://www.microsoft.com/windowsmobile/downloads/activesync41.mspx for downloading.
1. After downloading and installing ActiveSync, the "Connection Settings" command under the "File" menu is set up as follows:
2. Select
Visual Stduio"Tools"-"device Emulation Manager" under the menu bar, a Simulation manager window will pop up that contains all of the emulators (emulation devices) that we can use. Because I have the Windows Mobile 5.0 Smartphone SDK installed and Windows Mobile 5.0 Pocket pc, so it contains some emulation devices related to Windows Mobile 5.0, and the default state of Visual Stduio 2005 is Pocket PC 2003 and Smartphone 2003 emulation device.
3. We select the first emulator under the "Pocket PC 2003" List bar above. Right-click the Connect command. The Pocket PC 2003 emulator pops up.
4. Back to the Emulator Manager window, you will find that the startup emulator has added a green arrow icon. Right-click the Insert cradle on the Startup emulator. The collaboration between the emulator and the computer is established, and the other steps are clicked "Next" with the default option, and ActiveSync will show "connected synchronized" after the connection is successful.
5. Select the "Internet exploer" of the Emulator Start menu and enter the "www.yesky.com" url so that you can browse pole's home page in the emulator.
6. Now we use the emulator to view the design above
asp.netWeb Mobile page, which is slightly different from viewing mobile pages with the Openwave V7 simulator. We must put the generated URL at that cost to the IP address, so that it will get the correct display. For example, we generated the ASP.net web mobile page URL for http://localhost:1138/MobileApplication/ Mobiledefault.aspx, we have to enter http://192.168.10.17:1138/MobileApplication/MobileDefault.aspx if we want to display it in the emulator's IE. That is, change the localhost to a local ip:192.168.10.17, and view the local IP to run the ipconfig/all command at the command prompt. The following illustration shows the above ASP.net mobile Web page in Pocket PC ie: