tailieunhanh - Webmaster's Guide to the Wireless Internet part 43
Webmaster's Guide to the Wireless Internet part 43. 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 | 392 Chapter 9 Microsoft Mobile Internet Toolkit Mobile Command runat server onClick ComparePassword Register Mobile Command The onClick attribute indicates the subroutine to call when the user clicks on it. In this case the subroutine to be invoked is ComparePassword. Sub ComparePassword sender as Object e as EventArgs if 8 then Password must have at least 8 characters Exit sub end if if then Your passwords do not match. else ActiveForm Welcome end if End sub Within the subroutine you can simply reference the controls using their IDs. For example if you want to check for the length of the password that the user has entered you can simply reference the control using If the length of the password is less than eight we set the Text property of the Label control named message to contain the error message Password must have at least 8 characters We also check to see if the two passwords entered are the same. If they are we print a welcome message on the second form The second form is invoked by using the ActiveForm property ActiveForm Welcome Microsoft Mobile Internet Toolkit Chapter 9 393 List Selection Another form of user input is via a selection list. Consider the example in Figure . Figure @ Page Inherits Language VB @ Register TagPrefix Mobile Namespace Assembly Mobile Form runat server Mobile Label runat server Membership Types Mobile Label Mobile List runat server id Membership Item value STU text Students Item value PRO text Professionals Item value LIB text Libraries Mobile List Mobile Form The Mobile List control provides the ability to display lists of items either as a static list or interactive page in Figure causes the screens on the .
đang nạp các trang xem trước