Training
Certifications
Books
Special Offers
Community




 
MCAD/MCSD Self-Paced Training Kit: Developing Web Applications with Microsoft® Visual Basic® .NET and Microsoft Visual C#® .NET, Second Edition
Author Jeff Webb with Microsoft Corporation
Pages 864
Disk 1 Companion CD(s); 1 DVD(s)
Level All Levels
Published 05/14/2003
ISBN 9780735619272
Price $69.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 

Table of Contents


    About This Bookxvii
CHAPTER 1: Introduction to Web Programming1
        About This Chapter1
        Before You Begin1
    Lesson 1: Types of Applications2
        What Can You Create?2
        How Web Applications Work3
        What ASP.NET Provides5
        Advantages of ASP.NET6
    Lesson 2: Using ASP.NET7
        Parts of a Web Application7
        Web Form Components9
        The .NET Framework11
        Programming Languages14
    Lesson 3: Using Visual Studio .NET18
        The Start Page18
        Visual Studio .NET Windows21
        The Toolbox24
        Editing Web Documents25
        Editing Code-Behind Files26
        Editing Single-Source Web Forms30
        The Solution Explorer32
        Running a Project33
        Setting Breakpoints and Watching Variables34
        Executing Statements36
        Getting Help37
    Summary39
    Lab: Getting Started with Visual Studio .NET40
        Exercise 1: Customize the Visual Studio .NET Environment40
        Exercise 2: Set Up a Web Hosting Account42
        Exercise 3: Choose a Service Provider43
        Exercise 4: Explore the ASP.NET QuickStart Tutorials46
    Review49
CHAPTER 2: Creating Web Forms Applications51
        About This Chapter51
        Before You Begin51
    Lesson 1: Creating an ASP.NET Web Application Project52
        Creating a New Web Application52
        Organizing Your Projects with IIS53
        Creating Virtual Folders to Organize Web Applications54
        Creating a Virtual Folder54
        Creating a Subweb56
        Creating a New Project in the Virtual Folder58
        Adding Controls and Writing Code58
        The Files in a Web Forms Project62
        The Files in a Web Application64
    Lesson 2: Responding to Events65
        Events in the Life Cycle of a Web Application65
        Preserving Data on a Web Form67
        Application and Session Events68
        Web Form Events70
        Server Control Events72
    Lesson 3: Where Does Processing Occur?74
        Application Boundaries and Start Pages74
        How IIS and ASP.NET Manage Processes76
        Determining When an Application Ends76
    Summary78
    Lab: Building a Simple Web Application79
        Exercise 1: Create the User Interface79
        Exercise 2: Create a Class Named FlashCardClass80
        Exercise 3: Store a FlashCardClass Object in Session State83
        Exercise 4: Use the FlashCardClass Object from Web Form Events84
    Review87
CHAPTER 3: Working with Web Objects89
        About This Chapter89
        Before You Begin89
    Lesson 1: Namespace Fundamentals90
        Understanding Namespaces90
        References vs. Imports96
        Classes and Modules96
        Creating Classes/Modules and Providing Access98
        Inheritance: Who's Deriving?102
        Overriding, Overloading, and Shadowing Members103
        In the Abstract109
        Delegates and Events112
        Interface-to-Face119
    Lesson 2: Namespaces in a Web Application123
        Overview of Web Namespaces123
        Using the Application Object125
        Using the Page Object126
        Using the Request Object128
        Using the Response Object130
    Lesson 3: Maintaining State Information132
        Overview of Levels of State132
        Using Context.Handler133
        Using Query Strings135
        Using Cookies136
        Using ViewState137
        Using Application and Session States139
        Structuring Access to State Variables139
        Turning Off Session State142
    Summary143
    Lab: Using Objects and Saving Data144
        Exercise 1: Create the User Interface144
        Exercise 2: Create a Translator Class145
        Exercise 3: Store a Translator Object in Session State148
        Exercise 4: Use the TransClass Object from Web Form Events149
    Review151
CHAPTER 4: Creating a User Interface153
        About This Chapter153
        Before You Begin153
    Lesson 1: Using Controls154
        Selecting a Layout154
        Choosing the Right Control157
        Working with Text158
        Working with Tables and Lists161
        Adding Items to a List or Table at Design Time161
        Adding Items to a List or Table at Run Time162
        Getting the Selected Item from a List164
        Using Simple Data Binding with Lists165
        Adding Items to DataGrid, DataList, and Repeater Controls167
        Performing Commands170
        Getting and Setting Values174
        Displaying Graphics and Advertisements176
        Grouping Controls178
        Getting Dates180
        Getting Files from the Client182
    Lesson 2: Validating Data186
        Using Validation186
        Combining Validations189
        Canceling Validation191
        Customizing Validation192
    Lesson 3: Navigating Between Forms195
        Ways to Navigate195
        Using Hyperlinks and Redirection196
        Using the Transfer Method196
        Using the Execute Method199
        Displaying a Page in a New Browser Window200
    Summary204
    Lab: Building a Web-Based Text Editor205
        Exercise 1: Create the Sign-On Form205
        Exercise 2: Create the NewAccount Form208
        Exercise 3: Create the File Manager Form212
        Exercise 4: Create the File Editor Form216
        Exercise 5: Create the Not Authorized Web Form221
    Review223
CHAPTER 5: Storing and Retrieving Data with ADO.NET225
        About This Chapter225
        Before You Begin225
    Lesson 1: Accessing Data with ADO.NET226
        Understanding ADO.NET226
        Connecting to a Database228
        Creating a Data Set231
        Displaying a Data Set233
        Creating a Custom Data View235
        Changing Records in a Database237
        How ADO.NET Refers to Objects237
        Adding, Changing, and Deleting Rows239
        Updating the Database from the DataSet241
        Creating a Database Connection at Run Time244
        Updating a Run-Time Database Connection245
        Storing Multiple Tables and Caching Data Sets248
    Lesson 2: Using Data Sets on Web Forms252
        Displaying a Data Set in a DataGrid Control252
        Displaying a Data Set in a DataList Control255
        Displaying Data Items in Other List Controls259
        Selecting Specific Records261
        Executing Commands on a Database263
        Returning a Value from a Database264
        Changing Records Directly in a Database266
        Retrieving Records Directly from the Database267
        Executing Stored Procedures270
    Lesson 3: Processing Transactions273
        Understanding Transactions273
        Data Set Transactions275
        Database Transactions278
        Enterprise Transactions282
    Summary283
    Lab: Building the Contact Management Application284
        Exercise 1: Start a Project and Create the SwitchBoard Form284
        Exercise 2: Add Database Components285
        Exercise 3: Create the AddContact Form288
        Exercise 4: Create the Calls Form294
        Exercise 5: Create the DeleteContact and ContactTypes Forms302
    Review304
CHAPTER 6: Catching and Correcting Errors305
        About This Chapter305
        Before You Begin305
    Lesson 1: Using Exception Handling306
        Exception-Handling Techniques306
        Using Exception-Handling Structures308
        Causing Exceptions313
        Defining New Exceptions314
        Using Error Events315
    Lesson 2: Using Error Pages318
        Handling Internet-Related Exceptions318
        Using Application-Wide Error Pages320
        Using Page-Level Error Pages322
    Lesson 3: Logging Exceptions324
        Using Tracing to Log Errors324
        Turning Tracing On and Off325
        Writing Messages to the Trace Log326
        Reading the Trace Log328
    Summary330
    Lab: Adding Exception Handling to an Application331
        Exercise 1: Extend Exception Handling331
        Exercise 2: Add an Error Event Procedure334
        Exercise 3: Create and View the Trace Log336
        Exercise 4: Extend Exception Handling to Other Web Forms337
    Review338
CHAPTER 7: Advanced Web Forms Programming339
        About This Chapter339
        Before You Begin339
    Lesson 1: Saving and Retrieving User Information340
        Identifying Web Application Users340
        Storing User Information on the Client341
        Facts About Cookies343
        Using Keys Within Cookies343
        Storing User Information on the Server345
        Creating Unique Keys to Identify Users345
        Creating a File to Store User Information346
        Creating an XML File347
        Creating an XML Schema347
        Specifying a Key Field348
        Reading the XML into a Data Set349
        Saving User Information on the Server350
        Retrieving User Information from the Data Set351
    Lesson 2: Using Unmanaged Code353
        Using Platform Invoke353
        Converting Data Types356
        Handling Exceptions from Unmanaged Procedures359
        Limitations of Unmanaged Code361
    Lesson 3: Interoperating with COM362
        Using COM Objects from .NET362
        Building .NET Objects for Use from COM365
        Hiding Public .NET Classes from COM366
        Tools Used by COM Interop372
        Handling Exceptions Between .NET and COM372
        Limitations of COM Interop372
    Lesson 4: Using Client-Side Scripts374
        Before You Use Scripts374
        Choosing a Scripting Language376
        Understanding the DOM376
        Adding Inline Scripts377
        Responding to Events with Script Procedures380
        Sending Mail386
    Lesson 5: Consuming XML Web Services389
        Finding XML Web Services389
        Using an XML Web Service390
        Using XML Web Services from Client-Side Scripts392
        Using Licensed XML Web Services394
    Summary397
    Lab: Using Advanced Features398
        Exercise 1: Check Advanced Feature Support399
        Exercise 2: Store User Information401
        Exercise 3: Create a Mail Web Form404
        Exercise 4: Create a Frame-Based User Interface407
        Exercise 5: Extra Practice Using Advanced Features409
    Review411
CHAPTER 8: Maintaining Security413
        About This Chapter413
        Before You Begin413
    Lesson 1: Authenticating and Authorizing Users415
        Access by Anonymous Users415
        Access by Authenticated Users418
        Using Authentication with HTM and HTML Files420
    Lesson 2: Using Windows Authentication422
        Enabling Windows Authentication422
        Allowing or Denying Access to Specific Users426
        Using Role-Based Authorization426
        Getting the User Identity427
        Using IIS Settings with Windows Authentication428
        Using Impersonation430
    Lesson 3: Using Forms Authentication432
        Enabling Forms Authentication432
        Setting the Forms Authentication Mode433
        Creating a LogIn Web Form435
        Authenticating Users with a Database437
        Adding Users to a Database438
        Authenticating Users from a Database440
        Controlling Access to Specific Locations443
    Lesson 4: Using Passport Authentication445
        Enabling Passport Authentication445
    Lesson 5: Providing Secure Communication451
        Enabling Secure Communication451
        Generating a Certificate Request453
        Requesting a Certificate454
        Installing the Certificate455
        Using Secure Communications456
    Summary460
    Lab: Creating a Secure Application461
        Exercise 1: Enable Forms Authentication462
        Exercise 2: Create the LogIn Web Form462
        Exercise 3: Display User Information469
        Exercise 4: Advanced Topics471
    Review472
CHAPTER 9: Building and Deploying Web Applications473
        About This Chapter473
        Before You Begin473
    Lesson 1: Building a Web Application474
        Setting Build Options474
        Identifying the Application478
        Configuring the Application480
    Lesson 2: Deploying a Web Application482
        Using the Upload Tools482
        Hosting on Your Own Server483
        Setting Up a Virtual Folder484
        Copying the Application484
        Installing Shared Components485
        Assigning Security Privileges486
    Lesson 3: Creating an Installation Program490
        Creating a Setup and Deployment Project490
        Modifying the Setup Project for Web Deployment494
        Reviewing the Setup Project's Contents and Adding Files495
        Renaming and Adding Virtual Folders496
        Adding Shared Components497
    Lesson 4: Maintaining a Deployed Application498
        Monitoring the Server498
        Viewing Events499
        Defining New Events500
        Creating Event Logs505
        Viewing Event Logs508
        Repairing Deployed Applications511
        Tuning Deployed Applications513
        Adjusting processModel Attributes513
        Adjusting sessionState Attributes514
        Optimization Tips515
    Lesson 5: Deploying Across Multiple Servers516
        Scaling Up with Multiple Processors516
        Scaling Up with Multiple Servers517
        Sharing State Information518
        Sharing Application State518
        Sharing Session State518
    Summary520
    Lab: Building and Deploying a Web Application521
        Exercise 1: Prepare the Application521
        Exercise 2: Deploy the Application521
        Exercise 3: Chart Application Performance522
    Review524
CHAPTER 10: Testing Web Applications525
        About This Chapter525
        Before You Begin525
    Lesson 1: Creating Tests526
        Developing a Test Plan526
        Types of Tests527
        Unit Testing528
        Integration Testing531
        Regression Testing534
        Load Testing534
        Recording a Load Test534
        Setting Test Properties537
        Running Load Tests538
        Platform Testing539
    Lesson 2: Running Tests540
        Running Tests with ACT540
        Logging Test Results540
        Using Multiple Connections542
        Adding Users and Passwords543
        Adding Performance Counters545
        Mimicking Browser Types546
        Getting Content of Responses546
        Running Tests with .NET Assemblies547
        Registering .NET Assemblies548
        Locating the .NET Assembly549
        Creating the .NET Object549
        Running Unattended Builds and Tests551
        Creating a Command File552
        Scheduling Tasks553
        Viewing Log Files555
    Lesson 3: Debugging556
        Putting Test Results to Work556
        Using the Debug and Trace Classes560
        Displaying Alerts and Messages560
        Logging Debug and Trace Messages561
        Remote Debugging562
        Installing Remote Components562
        Setting Server Permissions563
        Attaching to a Remote Process564
    Summary567
    Lab: Testing and Debugging568
        Exercise 1: Review a Test Plan568
        Exercise 2: Write Unit Tests568
        Exercise 3: Create a Load Test569
        Exercise 4: Step Through a Remote Process569
    Review571
CHAPTER 11: Creating Custom Web Controls573
        About This Chapter573
        Before You Begin574
    Lesson 1: Creating Web User Controls575
        Creating and Using User Controls575
        Creating a User Control and Drawing Its Interface576
        Writing the Control's Properties, Methods, and Events577
        Adding the Control to a Web Form580
        Using the Control in Code581
        Adding Events to the User Control582
        Enabling Grid Layout584
    Lesson 2: Creating Composite Custom Controls586
        Creating and Using Composite Custom Controls586
        Creating the Custom Control Project587
        Creating the Test Project590
        Adding the Custom Control to the Test Project592
        Creating the Composite Control's Appearance596
        Creating Properties and Methods599
        Handling Events603
        Raising Events604
        Handling Control Resizing606
        Superclassing Server Controls606
    Lesson 3: Creating Rendered Custom Controls609
        Creating and Using Rendered Controls609
        Creating the Rendered Control's Appearance610
        Storing Property Settings613
        Getting Contained Text614
        Responding to User Actions617
        Raising Cached Events617
        Raising Postback Events619
        Getting Data from the User622
        Adding Custom Controls to the Toolbox625
        Setting the Toolbox Icon and TagPrefix for Custom Controls627
    Summary629
    Lab: Creating Custom Controls630
        Exercise 1: Create an AddressBox User Control630
        Exercise 2: Create the DigitPad Composite Custom Control631
        Exercise 3: Create the BarChart Rendered Custom Control632
    Review633
CHAPTER 12: Optimizing Web Applications with Caching635
        About This Chapter635
        Before You Begin635
    Lesson 1: Caching Web Forms636
        Using the OutputCache Directive636
        Caching Multiple Responses from a Single Web Form637
        Controlling Caching in Code639
        Controlling Where Items Are Cached641
    Lesson 2: Caching Parts of Web Forms642
        Caching Parts of a Web Form with User Controls642
        Caching Multiple Versions of a User Control643
        Using Cached User Controls in Code644
        Combining Web Form Caching and User Control Caching645
    Lesson 3: Caching Application Data646
        Using the Cache Object646
        Controlling How Long Data Is Cached649
        Responding to Cache Events649
        Updating the Cache When Data Changes651
    Lesson 4: Monitoring Cache Performance654
        Using the Performance Monitor654
        Choosing Cache Performance Counters655
    Summary657
    Lab: Combining Caching at Multiple Levels658
        Exercise 1: Cache Multiple Versions of the Web Form658
        Exercise 2: Cache a Customer List660
        Exercise 3: Cache Data from a Stored Procedure662
        Exercise 4: Test Cache Performance665
    Review667
CHAPTER 13: Formatting Web Application Output669
        About This Chapter669
        Before You Begin669
    Lesson 1: Using Cascading Style Sheets670
        How Styles Work670
        Using Style Sheets with Web Forms672
        Modifying Styles673
        Adding Styles674
        Using Style Classes675
        Creating Styles for Specific Elements676
        Creating Nested Styles677
        Changing Style Sheets at Run Time679
        Using Behaviors681
    Lesson 2: Using XSL Transformations685
        How XSL Transformations Work685
        Creating an XML File687
        Creating an XSL File688
        Changing Layout690
        Including Other Templates692
        Repeating Tasks693
        Inserting Hyperlinks and Other HTML Elements695
        Sorting Items697
        Performing Conditional Tasks697
    Summary700
    Lab: Creating the Cookbook701
        Exercise 1: Create and Attach a Style Sheet701
        Exercise 2: Provide Alternative Style Sheets702
        Exercise 3: Perform XSL Transformation704
        Exercise 4: On Your Own705
    Review706
CHAPTER 14: Providing Help707
        About This Chapter707
        Before You Begin707
    Lesson 1: Adding Help to Web Applications708
        Displaying ToolTips708
        Displaying Help as Web Forms or HTML709
        Displaying HTML Help711
    Lesson 2: Using the HTML Help Workshop714
        Creating HTML Help714
        Setting Project Options716
        Building Tables of Contents718
        Adding Index Entries722
        Adding Cross-References723
        Adding Related Topics724
        Creating Associative Links724
        Enabling Searches726
        Compiling and Previewing Help727
    Lesson 3: Linking HTML Help to Web Forms728
        Displaying the HTML Help Viewer728
        Displaying HTML Help in the Browser730
        Displaying Context-Sensitive Help730
    Summary733
    Lab: Building and Using an HTML Help File734
        Exercise 1: Create a Help Project734
        Exercise 2: Enable Contents, Index, and Search735
        Exercise 3: Add Index Keywords737
        Exercise 4: Link Help to a Web Form738
    Review740
CHAPTER 15: Globalizing Web Applications741
        About This Chapter741
        Before You Begin741
    Lesson 1: Choosing an Approach742
        Ways to Globalize Web Applications742
        Detecting the User's Culture743
        Redirecting to Culture-Specific Web Applications744
        Redirecting Based on Primary Language745
        Setting Culture in Web.config747
        Adjusting to Current Culture at Run Time749
        Setting the Current Culture750
        Responding to the Thread's Culture753
        Using Satellite Assemblies754
    Lesson 2: Creating and Using Satellite Assemblies755
        How Satellite Assemblies Work755
        Enabling HTML Elements for Resources757
        Creating Resource Files758
        Loading Resource Files760
        Getting and Setting User-Interface Culture761
        Displaying Resource Strings762
    Lesson 3: Globalization Issues 765
        General Programming Issues765
        Sorting and Comparing Strings765
        Custom Validation Controls765
        Building Strings766
        Getting Substrings766
        Character Encoding766
        Saving Encoded Files766
        Using Other Encodings767
    Summary769
    Lab: Creating a Currency Converter770
        Exercise 1: Create the Currency Converter Web Form770
        Exercise 2: Create the User-Interface Resource Files771
        Exercise 3: Load Resources Based on User Culture773
        Exercise 4: Perform Culture-Dependent Conversion775
    Review778
APPENDIX A Questions and Answers779
GLOSSARY793
INDEX799



Last Updated: May 15, 2003
Top of Page