| Acknowledgments | xv |
| Introduction | xvii |
| 1 Introducing .NET for the Mobile Web | 1 |
| The Birth of the Wireless Web | 3 |
| The Internet | 4 |
| Wireless Communication | 5 |
| Mobile Data Communications | 6 |
| The Mobile Internet Toolkit | 10 |
| A Solution for the Wireless Muddle | 14 |
| A Solution for the Wireless Muddle | 14 |
| 2 ASP.NET and the Mobile Internet Toolkit | 17 |
| Overview of ASP.NET | 17 |
| Prehistory | 17 |
| ASP: A Simpler Alternative | 18 |
| ASP.NET: A New Approach to Web Development | 18 |
| Developing Web Applications | 19 |
| A Closer Look at ASP.NET Web Forms | 19 |
| Using Web Forms Controls | 20 |
| Working with .NET Tools in Web Applications | 22 |
| Extending Web Applications | 22 |
| Developing with Mobile Web Forms | 23 |
| Defining Device Capabilities | 23 |
| Abstracting the Mobile Device User Interface | 23 |
| Using Mobile Web Forms Controls | 24 |
| Working with .NET Tools in Mobile Web Forms | 25 |
| Introduction to .NET Languages | 26 |
| CLS-Compliant Languages | 26 |
| Implementing Code | 27 |
| Consuming Events | 28 |
| Introducing XML Web Services | 28 |
| Session Management and Security | 29 |
| Working with Sessions | 29 |
| Using Cookies | 29 |
| Deploying in Distributed Architectures | 30 |
| Debugging Mobile Applications | 30 |
| Using Simple Tools | 31 |
| Debugging Programmatically | 32 |
| Debugging with Visual Studio .NET | 32 |
| 3 Developing Mobile Web Applications | 33 |
| Setting Up Your Development System | 33 |
| Creating Your First Mobile Web Applications | 35 |
| Using Visual Studio .NET | 35 |
| Creating a Mobile Web Project | 37 |
| Using Solution Explorer and the Properties Dialog Box | 39 |
| Building the User Interface with the Toolbox | 42 |
| Building and Running Your Application | 43 |
| Testing with a Mobile Phone Emulator | 44 |
| Setting Up the Openwave Simulator | 44 |
| Working with the Mobile Internet Designer | 48 |
| The Mobile Web Forms Page and the Form Control | 48 |
| Working with Multiple Mobile Web Forms | 51 |
| Backward and Forward Navigation in Mobile Web Applications | 53 |
| Device-Specific Rendering of Complex Controls | 54 |
| Getting Help in Visual Studio .NET | 56 |
| Connecting Visual Studio .NET Projects with the SDK Samples | 57 |
| Design and HTML Views | 58 |
| Working with Visual Studio .NET Projects | 61 |
| Files Created by a Visual Studio .NET Mobile Web Application Project | 61 |
| Choosing the Project Location | 65 |
| Specifying Web Server Access Methods | 66 |
| Copying Projects | 67 |
| Opening Projects | 67 |
| Deleting Projects | 69 |
| Developing in a Team | 69 |
| Working Offline | 70 |
| 4 Dynamic Mobile Applications | 71 |
| Coding Strategies | 72 |
| Language Choice | 72 |
| Inline Coding and Coding Behind | 73 |
| Application 1: Hello Universe | 75 |
| Application Summary | 80 |
| Application 2: Scheduler | 80 |
| Persisting Class Members | 83 |
| Building and Testing the Application | 84 |
| Application Summary | 86 |
| Application 3: Scheduler Plus | 86 |
| Building and Testing the Application | 90 |
| Understanding the Application Life Cycle | 90 |
| Application Summary | 91 |
| Application 4: TicToc | 91 |
| Building the User Interface | 92 |
| Creating the Code-Behind Module | 93 |
| Building and Testing the Application | 96 |
| 5 Using the Mobile Internet Toolkit Standard Controls | 99 |
| Introducing the Controls: Class Hierarchy | 99 |
| The MobilePage Class | 100 |
| Properties of the MobilePage Class | 104 |
| Common Mobile Control Behavior | 104 |
| Using the Control Examples | 107 |
| Container Controls | 109 |
| Containment Rules | 109 |
| Form Controls | 110 |
| Panel Controls | 116 |
| Core Controls | 118 |
| Label Controls | 119 |
| TextBox Controls | 122 |
| TextView Controls | 127 |
| Link Controls | 131 |
| Command Controls | 134 |
| Image Controls | 140 |
| 6 List Controls | 147 |
| SelectionList Controls | 149 |
| Syntax | 149 |
| Properties | 150 |
| Usage | 152 |
| Binding to a Data Collection | 157 |
| The List Control | 160 |
| Syntax | 160 |
| Properties | 161 |
| Usage | 161 |
| The ObjectList Control | 168 |
| Syntax | 168 |
| Properties | 170 |
| Usage | 173 |
| 7 Special-Purpose Controls and Validation Controls | 187 |
| Special-Purpose Controls | 187 |
| Calendar Control | 188 |
| PhoneCall Control | 193 |
| AdRotator Control | 196 |
| Validation Controls | 201 |
| RequiredFieldValidator Control | 203 |
| CompareValidator Control | 206 |
| RangeValidator Control | 210 |
| RegularExpressionValidator Control | 214 |
| CustomValidator Control | 218 |
| ValidationSummary Control | 221 |
| Validation Controls Example | 224 |
| 8 Styles and Device-Specific Rendering | 229 |
| Overview | 229 |
| Styles | 229 |
| Property Overrides | 230 |
| Templates | 230 |
| Programming Styles and Style Sheets | 231 |
| Using Style Properties | 232 |
| Using the Style Sheet Control | 237 |
| Working with Styles in Visual Studio .NET | 246 |
| Device-Specific Customization with Property Overrides | 248 |
| <DeviceSpecific> and <Choice> Elements | 250 |
| Device Filters | 253 |
| Using Templated Controls | 267 |
| Using the Form Control Templates | 269 |
| Using the List and ObjectList Control Templates | 276 |
| Using the Panel Control Template | 285 |
| Working with Controls in Templates in Code | 289 |
| Defining Templates Using Visual Studio .NET Tools | 292 |
| Defining Templates Within Style Sheets | 296 |
| 9 Accessing Data | 299 |
| Using Advanced Data Binding Features of the List Controls | 299 |
| Defining Static List and SelectionList Items | 300 |
| Binding to a Data Collection | 300 |
| Overriding Single-Field Display in the List Controls | 304 |
| Using ASP.NET Declarative Data Binding | 306 |
| Using DataBinder.Eval | 309 |
| Understanding Naming Containers | 310 |
| Using ADO.NET | 312 |
| Understanding the ADO.NET Objects | 312 |
| Using a DataReader Object for Read-Only Data Access | 314 |
| Using a DataSet Object for Data Binding | 316 |
| Creating a Mobile Web Application to Update a Database | 317 |
| The Microsoft Visual Database Tools | 323 |
| Using Server Explorer | 323 |
| Creating Data Components | 324 |
| Using a Data Component in a Web Application | 327 |
| Learning More About ADO.NET | 331 |
| 10 State Management | 333 |
| Session State | 334 |
| Using the Session Object | 335 |
| Working with Cookies | 338 |
| Using Munged URLs | 338 |
| To Cookie or Not to Cookie | 339 |
| Hidden Variables | 340 |
| View State | 343 |
| Application State | 347 |
| Using Application State in Global.asax | 347 |
| Things to Consider When Using Application State | 352 |
| 11 Designing Compelling Mobile Web Applications | 355 |
| Basic Design Principles | 356 |
| Building ASP.NET Applications with Integrated Desktop and Mobile Access | 359 |
| Tailoring Functionality to the Client Device | 359 |
| Implementing a Redirect Page for the Mobile Web Site | 359 |
| Optimizing Performance | 361 |
| Using Page Output Caching | 364 |
| Using Fragment Caching | 371 |
| Using Data Caching | 372 |
| Building Multilingual and Multicultural Mobile Web Applications | 373 |
| Defining Culture for Formatting Strings, Dates, and Times | 374 |
| Supporting Localized Content | 377 |
| Defining Character Set Encodings | 382 |
| 12 XML Web Services | 383 |
| Creating an XML Web Service | 384 |
| Using a Text Editor | 385 |
| Using Visual Studio .NET | 386 |
| Deploying and Consuming an XML Web Service | 387 |
| Using Command-Line Tools | 388 |
| Using Visual Studio .NET | 390 |
| Using Other Technologies | 393 |
| Defining XML Web Service Behavior | 395 |
| Managing Session and Application State | 398 |
| Working with Data Types | 401 |
| Accessing Data | 406 |
| Considerations for Mobile Devices | 411 |
| 13 Debugging, Testing with Emulators, and Handling Runtime Errors | 413 |
| Debugging Mobile Web Applications | 414 |
| Configuring Applications to Support Debugging | 415 |
| Using the Trace Facility | 417 |
| Adding Your Own Trace Statements | 419 |
| Working with Application-Level Tracing | 420 |
| Handling Errors | 422 |
| Implementing Custom Error Pages | 422 |
| Handling Errors Programmatically | 425 |
| Testing with Emulators and Real Devices | 428 |
| Testing with Pocket Internet Explorer | 428 |
| Testing with a Pocket PC Emulator | 429 |
| Testing with Mobile Phone Emulators | 431 |
| Integrating an Emulator into Visual Studio .NET | 440 |
| 14 Packaging, Configuration, and Security | 443 |
| Packaging and Deploying an Application | 444 |
| Copying an Application | 444 |
| Creating a Web Setup Project | 446 |
| Configuring Applications | 450 |
| Understanding the .NET Configuration Files | 450 |
| Web.config Configuration Example | 454 |
| ASP.NET Application Security | 454 |
| Providing Authentication | 455 |
| Role and User Authorization | 459 |
| 15 Creating User Controls and Custom Controls | 461 |
| Building a User Control | 461 |
| Creating a Simple User Control | 462 |
| Coding a User Control Module | 462 |
| Using a User Control in a Web Forms Page | 463 |
| User Control Example | 464 |
| Building Controls in Code | 474 |
| Understanding the Control Life Cycle | 475 |
| Building Controls by Inheritance | 477 |
| Using a Compiled Custom Control | 481 |
| Building Controls by Composition | 483 |
| 16 Building Controls from Scratch and Using Device Adapters | 497 |
| Building Controls from Scratch | 498 |
| The Control Life Cycle | 498 |
| The Role of Device Adapters | 499 |
| Building Simple Custom Controls and Device Adapters | 507 |
| A Simple Control with Device Adapters for HTML and WML | 507 |
| Writing Device Markup with the MobileTextWriter Classes | 512 |
| Handling Style Attributes in Device Adapters | 512 |
| Using Custom Controls and Device Adapters | 514 |
| Building a Data Bound Custom Control | 517 |
| Supporting Internal and Custom Pagination | 524 |
| Implementing the OnDataBind Event | 526 |
| Supporting View State in a Custom Control | 529 |
| Saving Control Properties to the ViewState Object | 530 |
| Understanding the IStateManager Interface | 530 |
| Using PrivateViewState | 535 |
| Implementing a Custom MobileControlBuilder | 535 |
| Enabling Client Postback in a Custom Control | 538 |
| Implementing Postback for CMTable | 538 |
| Processing Postdata | 543 |
| Implementing Postdata Processing in the CMTable Control | 543 |
| Providing Different User Interfaces in the DeviceAdapter Classes | 545 |
| Adding Child Controls in a Device Adapter Class | 549 |
| Developing a Templated Custom Control | 551 |
| Implementing Support for Templates | 552 |
| Implementing Template Support for a Data Bound List Control | 553 |
| 17 Supporting New Clients | 561 |
| Support Through Configuration Files | 561 |
| Supporting a New Client | 564 |
| Identifying the Device | 565 |
| Identifying Device Capabilities | 567 |
| Working with Device Adapters | 575 |
| The Role of Device Adapters | 576 |
| Using Device Adapter Sets | 577 |
| Defining a Device Adapter Set | 579 |
| INDEX | 583 |