tailieunhanh - Webmaster's Guide to the Wireless Internet part 42

Webmaster's Guide to the Wireless Internet part 42. The Webmaster’s Guide to the Wireless Internet provides the Wireless Webmaster with all of the tools necessary to build the next generation Internet. Packed with the essential information they need to design, develop, and secure robust, e-commerce enabled wireless Web sites. This book is written for advanced Webmasters who are experienced with conventional Web site design and are now faced with the challenge of creating sites that fit on the display of a Web enabled phone or PDA | 382 Chapter 9 Microsoft Mobile Internet Toolkit Figure Viewing the Mobile Web Form on the Various Devices Let s now take a closer look at the first few lines of a Mobile Web Form contains the standard header directives Microsoft Mobile Internet Toolkit Chapter 9 383 @ Page Inherits Language VB @ Register TagPrefix Mobile Namespace Assembly The @ Page directive defines page-specific attributes used by the page parser and Inherits attribute specifies that the page is inherited from the class which itself is inherited from the Page Language attribute specifies the language to be used in the page. For our example we have used @ Register directive associates aliases with namespaces and class names. In the preceding Mobile Web form we use the tagprefix of Mobile to associate with the .MobileControls assembly in which the namespace you are associating with tagprefix resides is specified in the assembly attribute. Next we have the Mobile Form element acts as a container to group controls together logically. Mobile Form id FormOne runat server In our case we have a Mobile Label control which simply provides a label for text to be displayed. Mobile Label runat server Welcome to the Microsoft Mobile Internet Toolkit Mobile Label That s all there is to it As you can see during runtime when the form is requested the .NET runtime will automatically detect the type of devices requesting that page and perform a dynamic generation of the target markup languages. In our case the Pocket PC and IE both receive HTML as shown in Figure and the receives WML as shown in Figure . Figure HTML Receives by Pocket PC and IE html body form id FormOne name FormOne method post action __ufps .

TỪ KHÓA LIÊN QUAN