Building Microsoft ASP.NET Applications for Mobile Devices, 2/e
暫譯: 為行動裝置建置 Microsoft ASP.NET 應用程式,第2版

Andy Wigley, Peter Roxburgh

  • 出版商: MicroSoft
  • 出版日期: 2003-04-26
  • 售價: $2,380
  • 貴賓價: 9.5$2,261
  • 語言: 英文
  • 頁數: 720
  • 裝訂: Paperback
  • ISBN: 073561914X
  • ISBN-13: 9780735619142
  • 相關分類: .NETASP.NET
  • 已過版

買這商品的人也買了...

相關主題

商品描述

 

Summary

A comprehensive reference for developing mobile Web applications with ASP.NET Mobile Controls, which ships with Visual Studio .NET 2003

This update of a popular Microsoft Press® title shows programmers how to use the Microsoft .NET Framework, ASP.NET, and Microsoft Visual Studio® .NET 2003 to create powerful, next-generation applications that are available anywhere, on phones, Pocket PCs, and other mobile devices. With this title, programmers learn how to incorporate dynamic access to data with ADO.NET, plus how to deliver content from a single ASP.NET page to multiple client browsers on devices with limited display and input capabilities.

Table of Contents

Acknowledgments xv
Introduction xvii
1   Introducing Microsoft ASP.NET for the Mobile Web 1
    A Solution for the Wireless Muddle 4
    Developing with Mobile Web Forms 5
        Abstracting the Mobile Device User Interface 5
        Using Mobile Web Forms Controls 6
        Working with Mobile Web Forms Using .NET Tools 7
        Implementing Code 8
        Consuming Events 9
    Building Mobile Solutions with Microsoft .NET 9
    A Powerful Solution for Mobile Web Application Development 12
2   Getting Started 13
    Setting Up Your Development System 13
    Creating Your First Mobile Web Applications 16
        Creating a Mobile Web Project with Visual Studio .NET 17
        Using Solution Explorer and the Properties Dialog Box 19
        Building the User Interface with the Toolbox 20
        Building and Running Your Application 21
    Testing with a Mobile Phone Emulator 22
        Setting Up the Openwave Simulator 23
        Using the Simulator for Testing 24
    Working with the Mobile Internet Designer 26
        The Mobile Web Forms Page and Form Control 27
        Working with Multiple Form Controls 29
        Backward and Forward Navigation in Mobile Web Applications 32
        Device-Specific Rendering of Complex Controls 33
    Basic Design Principles 35
3   Programming ASP.NET Mobile Web Forms 39
    Understanding .aspx Files and Code-Behind Modules 40
        The Code-Behind Technique 40
        Design and HTML Views 42
        The Inline Coding Technique 45
        The MobilePage Class 47
        Properties of the MobilePage Class 48
    Using Events and Event Handlers 49
    Programming State Management in ASP.NET 56
        Persisting Class Members 58
        Building and Testing the Application 61
    Accessing .NET Framework Classes 63
        Building and Testing the Application 66
        Understanding the Application Life Cycle 66
    Writing Applications with a Text Editor 68
        Building the User Interface 68
        Creating the Code-Behind Module 69
        Building and Testing the Application 72
4   Programming the Standard Controls 75
    How to Use the Control Descriptions 75
    Introducing the Controls: Class Hierarchy 76
    Common Mobile Controls Behavior 78
    Container Controls 83
        Containment Rules 84
        Form Controls 85
        Panel Controls 91
    Core Controls 93
        Command Controls 94
        Image Controls 99
        Label Controls 105
        Link Controls 108
        TextBox Controls 111
        TextView Controls 117
5   Special-Purpose Controls and Validation Controls 121
    Special-Purpose Controls 122
        Calendar Control 122
        PhoneCall Control 128
        AdRotator Control 131
    Validation Controls 136
        Common Behavior of the Validation Controls 138
        RequiredFieldValidator Control 140
        CompareValidator Control 144
        RangeValidator Control 148
        RegularExpressionValidator Control 152
        CustomValidator Control 157
        ValidationSummary Control 161
        Validation Controls Example 165
6   Programming the List Controls 169
    Building Static or Data-Bound Lists 171
    The SelectionList Control 175
        Syntax 175
        Properties and Events 176
        Using the SelectionList Control 178
    The List Control 186
        Syntax 186
        Properties and Events 187
        Using the List Control 189
    The ObjectList Control 196
        Syntax 197
        Properties and Events 198
        Using the ObjectList Control 202
7   Using the Downloadable Controls 219
    Using the Custom Controls 219
        Adding the Controls to the Toolbox 220
        Copying the Control Assembly to Your Application 222
        Configuring Your Application to Use Custom Controls 223
    The MobileCheckbox Control 224
        Configuring Your Application 224
        Syntax 225
        Properties 226
        Using the MobileCheckbox Control 227
    The MobileMultiLineInput Control 228
        Installation 230
        Configuring Your Application 230
        Syntax 231
        Properties 231
        Using the MobileMultiLineInput Control 232
    The MobileDynamicImage Control 233
        Installation 235
        Configuring Your Application 235
        Syntax 236
        Properties 237
        Using the MobileDynamicImage Control 238
8   Programming Styles and Style Sheets 241
    Using Mobile Control Style Properties and the StyleSheet Control 241
        Using Style Properties 243
        Using the StyleSheet Control 248
    Pagination and Styles 256
        Using Pager Styles in Style Sheets 258
    Working with Styles in Visual Studio .NET 259
        The Styles Editor 259
    Using Cascading Style Sheets (CSS) 260
        Managing Cascading Style Sheets 262
        Programming your own CSS Style Sheet 262
9   Customizing with Property Overrides and Templates 267
    Customization Overview 267
        Property Overrides 268
        Templates 268
    Writing Device Filters 269
    Programming <DeviceSpecific> and <Choice> Elements 282
    Device-Specific Customization with Property Overrides 286
    Using Templated Controls 288
        Using the Form Control’s <HeaderTemplate>, <FooterTemplate>, and <ScriptTemplate> Elements 291
        Using the Panel Control’s <ContentTemplate> Element 298
        Working with Controls in Form and Panel Templates 302
        Defining Templates Using Visual Studio .NET Tools 305
        Defining Templates Within Style Sheets 308
10   Advanced List Control Programming 313
    Using the Advanced Data Binding Features of the List Controls 313
        Defining Static List and SelectionList Items 313
        Binding to a Data Collection 314
        Understanding Data Binding and ViewState 317
        Why the DataItem Property Is Sometimes null 320
    Overriding Single-Field Display in the List Controls 321
        Overriding Single-Field Display in SelectionList and List Controls 321
        Overriding Single-Field Display in ObjectList 322
    Using Templates in List and ObjectList Controls 323
        Programming the List Control Templates 324
        Programming the ObjectList Control Templates 332
        Using the ObjectList Control’s <ItemDetailsTemplate> 336
        Working with Controls in Templates Programmatically 341
        Accessing Controls in List and ObjectList Templates from Code 343
11   Accessing Data 347
    Using ASP.NET Declarative Data Binding 347
    Using ADO.NET 352
        Understanding the ADO.NET Objects 353
        Using a DataReader Object for Read-Only Data Access 355
        Using a DataSet Object for Data Binding 356
        Creating a Mobile Web Application to Update a Database 358
    Building Data Components with Visual Studio .NET 364
        Using Server Explorer 364
        Creating Data Components 365
        Using a Data Component in a Web Application 369
    Learning More About ADO.NET 372
12   State Management 373
    Session State 374
        Using the Session Object 376
        Working with Cookies 378
        Using Munged URLs 379
        To Cookie or Not to Cookie 380
    Hidden Variables 381
    ViewState 384
    Application State 388
        Using Application State in Global.asax 389
        Things to Consider When Using Application State 395
13   Enhancing Application Performance 397
    Programming and Configuration Techniques 397
        Turn Off Debug Support in Your Release Builds 397
        Disable ViewState If It’s Not Required 398
        Disable Session State If It’s Not Required 398
        Cache Data in the Application Object 399
        Use Custom Pagination with the List Controls 399
        Don’t Perform Unnecessary Processing on Postback 400
        Concatenate Strings Using System.Text.StringBuilder 400
        Optimize SQL Server Data Access 400
        Explicitly Declare Object Types in Visual Basic .NET 401
    Caching 401
        Using Output Caching 401
        Using Fragment Caching 410
        Using Data Caching 411
14   Multilingual and Multicultural Web Applications 413
    Building Multilingual and Multicultural Mobile Web Applications 413
    Defining Culture for Formatting Strings, Dates, and Times 414
    Creating and Using Resource Files 418
    Defining Character Set Encodings 424
15   XML Web Services 427
    Introduction to XML Web Services 427
        Using XML Web Services in Web Applications 428
        Managing Session and Application State 429
    Creating an XML Web Service 429
        Creating an XML Web Service Using a Text Editor 429
        Creating an XML Web Service Using Visual Studio .NET 430
    Consuming an XML Web Service 432
        Consuming XML Web Services Using Visual Studio .NET 432
    Defining XML Web Service Behavior 437
    Working with Data Types 440
    Accessing Data 444
    Considerations for Mobile Devices 449
16   Debugging, Testing with Emulators, and Handling Run-Time Errors 451
    Debugging Mobile Web Applications 452
        Configuring Applications to Support Debugging 453
    Using the ASP.NET Trace Facility 455
        Enabling Page-Level Tracing 456
        Enabling Application-Level Tracing 457
        Adding Your Own Trace Statements 459
        Executing Blocks of Code in Trace Mode 460
    Handling Errors 461
        Implementing Custom Error Pages 461
        Handling Errors Programmatically 464
    Testing with Emulators and Real Devices 467
        Using Pocket Internet Explorer for Application Testing 468
        Using a Pocket PC Emulator 469
        Testing with a Microsoft Smartphone Emulator 471
        Testing with Mobile Phone Emulators 472
        Integrating an Emulator into Visual Studio .NET 482
17   Packaging and Configuration 485
    Packaging and Deploying an Application 486
        Copying an Application 486
        Creating a Web Setup Project 490
    Deploying Applications to Servers Running Different Versions of the .NET Framework 494
        Installing .NET Framework Runtime on a Web Server 496
        Device Update Packs 497
    Configuring Applications 497
        Understanding the .NET Configuration Files 498
        Web.config Configuration Example 501
    Building ASP.NET Applications with Integrated Desktop and Mobile Access 502
        Tailoring Functionality to the Client Device 503
        Implementing a Redirect Page for the Mobile Web Site 503
18   ASP.NET Application Security 507
    Encrypting Data Transfers Between Client and Server 507
    Providing Authentication 509
        IIS Authentication 510
        ASP.NET Authentication 513
        Forms Authentication 514
        Passport Authentication 524
        Windows Authentication 529
    User Authorization 530
        Impersonating a User 531
        URL Authorization 532
19   Supporting New Clients 535
    Defining Mobile Devices in Configuration Files 536
        Device Configuration Files in .NET Framework 1.1 538
    Supporting a New Client 539
        Identifying the Device 540
        Identifying Device Capabilities 543
    Configuring Device Adapters 551
        The Role of Device Adapters 551
        Using Device Adapter Sets 553
        Defining a Device Adapter Set 554
20   Building a Reusable User Interface as User Controls 559
    Building a User Control 559
        Creating a Simple User Control 560
        Coding a User Control Module 560
    Using a User Control in a Web Forms Page 561
    User Control Example 561
        Implementing Properties in a User Control 564
        Displaying the Properties of the User Control 566
        Responding to Events in a User Control 570
21   Creating Custom Controls by Inheritance and Composition 575
    Building Controls in Code 575
        Understanding the Control Life Cycle 576
    Building Controls by Inheritance 580
        Using a Compiled Custom Control 584
    Building Controls by Composition 586
        Creating the Child Controls in a Composite Control 587
        Processing Postback Data 591
        Raising Custom Events 592
        Managing ViewState 596
22   Programming Device Adapters and Building Controls from Scratch 601
    Building Controls from Scratch 602
        The Control Life Cycle 602
        The Role of Device Adapters 606
    Building Simple Custom Controls and Device Adapters 612
        A Simple Control with Device Adapters for HTML and WML 613
        Writing Device Markup with the MobileTextWriter Classes 617
        Handling Style Attributes in Device Adapters 617
        Using Custom Controls and Device Adapters 620
    Building a Data Bound Custom Control 623
        Supporting Internal and Custom Pagination 629
        Implementing the OnDataBind Event 632
    Supporting ViewState in a Custom Control 634
        Saving Control Properties to the ViewState Object 635
        Understanding the IStateManager Interface 636
        Using PrivateViewState 640
    Implementing a Custom MobileControlBuilder Class 641
    Enabling Client Postback in a Custom Control 643
        Implementing Postback for the CMTable Control 644
    Processing Postdata 649
        Implementing Postdata Processing in the CMTable Control 649
        Providing Different User Interfaces in the DeviceAdapter Classes 651
        Adding Child Controls in a Device Adapter Class 654
    Developing a Templated Custom Control 658
        Implementing Support for Templates 658
        Implementing Template Support for a Data Bound List Control 660
INDEX 667

商品描述(中文翻譯)

摘要

這是一本全面的參考書,專為使用 ASP.NET Mobile Controls 開發行動 Web 應用程式而設,隨 Visual Studio .NET 2003 一同發佈。本書更新了 Microsoft Press® 的熱門書籍,教導程式設計師如何使用 Microsoft .NET Framework、ASP.NET 和 Microsoft Visual Studio® .NET 2003 來創建強大的下一代應用程式,這些應用程式可以在手機、Pocket PC 和其他行動設備上隨時隨地使用。透過本書,程式設計師將學會如何使用 ADO.NET 進行動態數據存取,以及如何從單一 ASP.NET 頁面向具有有限顯示和輸入能力的設備上的多個客戶端瀏覽器傳遞內容。

目錄

致謝

引言

1 介紹 Microsoft ASP.NET 行動網頁
- 無線混亂的解決方案
- 使用行動網頁表單進行開發
- 抽象行動設備使用者介面
- 使用行動網頁表單控制項
- 使用 .NET 工具處理行動網頁表單
- 實作程式碼
- 消費事件
- 使用 Microsoft .NET 建立行動解決方案
- 行動網頁應用程式開發的強大解決方案

2 開始使用
- 設定開發系統
- 創建您的第一個行動網頁應用程式
- 使用 Visual Studio .NET 創建行動網頁專案
- 使用解決方案總管和屬性對話框
- 使用工具箱建立使用者介面
- 建立並運行您的應用程式
- 使用行動電話模擬器進行測試
- 設定 Openwave 模擬器
- 使用模擬器進行測試
- 使用行動網際網路設計工具
- 行動網頁表單頁面和表單控制項
- 使用多個表單控制項
- 行動網頁應用程式中的前後導航
- 特定設備的複雜控制項渲染
- 基本設計原則

3 程式設計 ASP.NET 行動網頁表單
- 理解 .aspx 檔案和後端程式模組
- 後端程式技術
- 設計和 HTML 視圖
- 行內編碼技術
- MobilePage 類別
- MobilePage 類別的屬性
- 使用事件和事件處理器
- 在 ASP.NET 中程式設計狀態管理
- 持久化類別成員
- 建立和測試應用程式
- 存取 .NET Framework 類別
- 理解應用程式生命週期
- 使用文字編輯器編寫應用程式
- 建立使用者介面
- 創建後端程式模組
- 建立和測試應用程式

4 程式設計標準控制項
- 如何使用控制項描述
- 介紹控制項:類別層級
- 常見行動控制項行為
- 容器控制項
- 包含規則
- 表單控制項
- 面板控制項
- 核心控制項
- 命令控制項
- 圖像控制項
- 標籤控制項
- 連結控制項
- 文本框控制項
- 文本視圖控制項

5 特殊用途控制項和驗證控制項
- 特殊用途控制項
- 日曆控制項
- 電話撥號控制項
- 廣告旋轉控制項
- 驗證控制項
- 驗證控制項的常見行為
- 必填欄位驗證器控制項
- 比較驗證器控制項
- 範圍驗證器控制項
- 正則表達式驗證器控制項