Build Your Own ASP.NET 2.0 Web Site Using C# & VB, Second Edition

Book description

Learn how to build impressive ASP.NET 2.0 web sites in both C# and VB from scratch.

Using a practical step-by-step approach, the authors introduce the ASP.NET framework, teach you about database design, and walk you through obtaining, installing and configuring all the freely available software you need to use ASP.NET 2.0. The second edition of this guide will help you get your database-driven ASP.NET web site up and running in no time. This book does not assume prior ASP.NET experience, and includes all code samples in both C# & VB.

Table of contents

  1. Build Your Own ASP.NET 2.0 Web Site Using C# & VB (1/2)
  2. Build Your Own ASP.NET 2.0 Web Site Using C# & VB (2/2)
  3. Table of Contents (1/2)
  4. Table of Contents (2/2)
  5. Preface (1/2)
  6. Preface (2/2)
  7. Introducing ASP.NET and the .NET Platform
    1. What is ASP.NET?
    2. Installing the Required Software
      1. Installing the Web Server
        1. Installing Internet Information Services (IIS)
        2. Installing Cassini
      2. Installing the .NET Framework and the SDK
        1. Installing the .NET Framework
        2. Installing the SDK
      3. Configuring the Web Server (1/3)
      4. Configuring the Web Server (2/3)
      5. Configuring the Web Server (3/3)
        1. Configuring IIS
        2. Configuring Cassini
        3. Where do I Put my Files?
        4. Using localhost
        5. Virtual Directories
        6. Using Cassini
      6. Installing SQL Server 2005 Express Edition
      7. Installing SQL Server Management Studio Express
      8. Installing Visual Web Developer 2005
    3. Writing your First ASP.NET Page (1/2)
    4. Writing your First ASP.NET Page (2/2)
    5. Getting Help
    6. Summary
  8. ASP.NET Basics
    1. ASP.NET Page Structure
      1. Directives
      2. Code Declaration Blocks
        1. Comments in VB and C# Code
      3. Code Render Blocks
      4. ASP.NET Server Controls
      5. Server-side Comments
      6. Literal Text and HTML Tags
    2. View State
    3. Working with Directives
    4. ASP.NET Languages
      1. Visual Basic
      2. C#
    5. Summary
  9. VB and C# Programming Basics
    1. Programming Basics
      1. Control Events and Subroutines
      2. Page Events
      3. Variables and Variable Declaration
      4. Arrays
      5. Functions
      6. Operators
        1. Breaking Long Lines of Code
      7. Conditional Logic
      8. Loops
    2. Object Oriented Programming Concepts
      1. Objects and Classes
      2. Properties
      3. Methods
      4. Classes
      5. Constructors
      6. Scope
      7. Events
      8. Understanding Inheritance
      9. Objects In .NET
      10. Namespaces
    3. Using Code-behind Files
    4. Summary
  10. Constructing ASP.NET Web Pages
    1. Web Forms
    2. HTML Server Controls
      1. Using the HTML Server Controls
    3. Web Server Controls
      1. Standard Web Server Controls (1/2)
      2. Standard Web Server Controls (2/2)
        1. Label
        2. Literal
        3. TextBox
        4. HiddenField
        5. Button
        6. ImageButton
        7. LinkButton
        8. HyperLink
        9. CheckBox
        10. RadioButton
        11. Image
        12. ImageMap
        13. PlaceHolder
        14. Panel
      3. List Controls
        1. DropDownList
        2. ListBox
        3. RadioButtonList
        4. CheckBoxList
        5. BulletedList
      4. Advanced Controls (1/3)
      5. Advanced Controls (2/3)
      6. Advanced Controls (3/3)
        1. Calendar
        2. AdRotator
        3. TreeView
        4. SiteMapPath
        5. Menu
        6. MultiView
        7. Wizard
        8. FileUpload
    4. Web User Controls
      1. Creating a Web User Control
        1. Using the Web User Control
    5. Master Pages
    6. Using Cascading Style Sheets (CSS)
      1. Types of Styles and Style Sheets
        1. Style Properties
        2. The CssClass Property
    7. Summary
  11. Building Web Applications
    1. Introducing the Dorknozzle Project
    2. Using Visual Web Developer
      1. Meeting the Features (1/2)
      2. Meeting the Features (2/2)
        1. The Solution Explorer
        2. The Web Forms Designer
        3. The Code Editor
        4. IntelliSense
        5. The Toolbox
        6. The Properties Window
    3. Executing your Project
      1. Using Visual Web Developer’s Built-in Web Server
      2. Using IIS (1/2)
      3. Using IIS (2/2)
        1. Using IIS with Visual Web Developer
    4. Core Web Application Features
      1. Web.config
      2. Global.asax
      3. Using Application State (1/2)
      4. Using Application State (2/2)
      5. Working with User Sessions
      6. Using the Cache Object
      7. Using Cookies
    5. Starting the Dorknozzle Project
      1. Preparing the Sitemap
      2. Using Themes, Skins, and Styles (1/2)
      3. Using Themes, Skins, and Styles (2/2)
        1. Creating a New Theme Folder
        2. Creating a New Style Sheet
        3. Styling Web Server Controls
        4. Adding a Skin
        5. Applying the Theme
      4. Building the Master Page
      5. Using the Master Page
    6. Extending Dorknozzle
    7. Debugging and Error Handling
      1. Debugging with Visual Web Developer
      2. Other Kinds of Errors
      3. Custom Errors
      4. Handling Exceptions Locally
    8. Summary
  12. Using the Validation Controls
    1. Introducing the ASP.NET Validation Controls
      1. Enforcing Validation on the Server (1/2)
      2. Enforcing Validation on the Server (2/2)
    2. Using Validation Controls
      1. RequiredFieldValidator
      2. CompareValidator
      3. RangeValidator
      4. ValidationSummary
      5. RegularExpressionValidator
        1. Some Useful Regular Expressions
      6. CustomValidator
    3. Validation Groups
    4. Updating Dorknozzle
    5. Summary
  13. Database Design and Development
    1. What is a Database?
    2. Creating your First Database
      1. Creating a New Database Using Visual Web Developer
      2. Creating a New Database Using SQL Server Management Studio
    3. Creating Database Tables
      1. Data Types
      2. Column Properties
      3. Primary Keys
      4. Creating the Employees Table
      5. Creating the Remaining Tables
        1. Executing SQL Scripts
      6. Populating the Data Tables
    4. Relational Database Design Concepts
      1. Foreign Keys
      2. Using Database Diagrams
      3. Implementing Relationships in the Dorknozzle Database
      4. Diagrams and Table Relationships
        1. One-to-one Relationships
        2. One-to-many Relationships
        3. Many-to-many Relationships
    5. Summary
  14. Speaking SQL
    1. Reading Data from a Single Table
      1. Using the SELECT Statement
      2. Selecting Certain Fields
      3. Selecting Unique Data with DISTINCT
      4. Row Filtering with WHERE
      5. Selecting Ranges of Values with BETWEEN
      6. Matching Patterns with LIKE
      7. Using the IN Operator
      8. Sorting Results Using ORDER BY
      9. Limiting the Number of Results with TOP
    2. Reading Data from Multiple Tables
      1. Subqueries
      2. Table Joins
    3. Expressions and Operators
    4. Transact-SQL Functions
      1. Arithmetic Functions
      2. String Functions
      3. Date and Time Functions
    5. Working with Groups of Values
      1. The COUNT Function
      2. Grouping Records Using GROUP BY
      3. Filtering Groups Using HAVING
      4. The SUM, AVG, MIN, and MAX Functions
    6. Updating Existing Data
      1. The INSERT Statement
      2. The UPDATE Statement
      3. The DELETE Statement
    7. Stored Procedures
    8. Summary
  15. ADO.NET
    1. Introducing ADO.NET
      1. Importing the SqlClient Namespace
      2. Defining the Database Connection
      3. Preparing the Command
      4. Executing the Command
      5. Setting up Database Authentication
      6. Reading the Data
      7. Using Parameters with Queries (1/2)
      8. Using Parameters with Queries (2/2)
      9. Bulletproofing Data Access Code
      10. Using the Repeater Control (1/2)
      11. Using the Repeater Control (2/2)
    2. Creating the Dorknozzle Employee Directory
      1. More Data Binding (1/2)
      2. More Data Binding (2/2)
      3. Inserting Records (1/2)
      4. Inserting Records (2/2)
      5. Updating Records (1/4)
      6. Updating Records (2/4)
      7. Updating Records (3/4)
      8. Updating Records (4/4)
      9. Deleting Records
      10. Using Stored Procedures
    3. Summary
  16. Displaying Content Using Data Lists
    1. DataList Basics
    2. Handling DataList Events (1/2)
    3. Handling DataList Events (2/2)
    4. Editing DataList Items and Using Templates (1/2)
    5. Editing DataList Items and Using Templates (2/2)
    6. DataList and Visual Web Developer
    7. Styling the DataList
    8. Summary
  17. Managing Content Using Grid View and Details View
    1. Using the GridView Control (1/2)
    2. Using the GridView Control (2/2)
      1. Customizing the GridView Columns
      2. Styling the GridView with Templates, Skins, and CSS
      3. Selecting Grid Records
    3. Using the DetailsView Control
      1. Styling the DetailsView
    4. GridView and DetailsView Events
      1. Entering Edit Mode
      2. Using Templates
      3. Updating DetailsView Records
    5. Summary
  18. Advanced Data Access
    1. Using Data Source Controls
      1. Binding the GridView to a SqlDataSource (1/2)
      2. Binding the GridView to a SqlDataSource (2/2)
      3. Binding the DetailsView to a SqlDataSource (1/2)
      4. Binding the DetailsView to a SqlDataSource (2/2)
      5. Displaying Lists in DetailsView
      6. More on SqlDataSource
    2. Working with Data Sets and Data Tables
      1. What is a Data Set Made From?
      2. Binding DataSets to Controls (1/2)
      3. Binding DataSets to Controls (2/2)
      4. Implementing Paging
      5. Storing Data Sets in View State
      6. Implementing Sorting (1/3)
      7. Implementing Sorting (2/3)
      8. Implementing Sorting (3/3)
      9. Filtering Data
    3. Updating a Database from a Modified DataSet
    4. Summary
  19. Security and User Authentication
    1. Basic Security Guidelines
    2. Securing ASP.NET 2.0 Applications
      1. Working with Forms Authentication (1/3)
      2. Working with Forms Authentication (2/3)
      3. Working with Forms Authentication (3/3)
        1. Authenticating Users
        2. Working with Hard-coded User Accounts
        3. Configuring Forms Authentication
        4. Configuring Forms Authorization
        5. Storing Users in Web.config
        6. Hashing Passwords
        7. Logging Users Out
    3. ASP.NET 2.0 Memberships and Roles
      1. Creating the Membership Data Structures
      2. Using your Database to Store Membership Data
      3. Using the ASP.NET Web Site Configuration Tool
      4. Creating Users and Roles
      5. Changing Password Strength Requirements
      6. Securing your Web Application
      7. Using the ASP.NET Login Controls (1/2)
      8. Using the ASP.NET Login Controls (2/2)
        1. Authenticating Users
        2. Customizing User Display
    4. Summary
  20. Working with Files and Email
    1. Writing and Reading Text Files
      1. Setting Up Security
      2. Writing Content to a Text File
      3. Reading Content from a Text File
    2. Accessing Directories and Directory Information
      1. Working with Directory and File Paths
    3. Uploading Files
    4. Sending Email with ASP.NET
      1. Configuring the SMTP Server
      2. Sending a Test Email
      3. Creating the Company Newsletter Page (1/2)
      4. Creating the Company Newsletter Page (2/2)
    5. Summary
  21. Appendix A: Web Control Reference
    1. The WebControl Class
      1. Properties
      2. Methods
    2. Standard Web Controls
      1. AdRotator
        1. Properties
        2. Events
      2. BulletedList
        1. Properties
        2. Events
      3. Button
        1. Properties
        2. Events
      4. Calendar
        1. Properties
        2. Events
      5. CheckBox
        1. Properties
        2. Events
      6. CheckBoxList
        1. Properties
        2. Events
      7. DropDownList
        1. Properties
        2. Events
      8. FileUpload
        1. Properties
        2. Methods
      9. HiddenField
        1. Properties
      10. HyperLink
        1. Properties
      11. Image
        1. Properties
      12. ImageButton
        1. Properties
        2. Events
      13. ImageMap
        1. Properties
        2. Events
      14. Label
        1. Properties
      15. LinkButton
        1. Properties
        2. Events
      16. ListBox
        1. Properties
        2. Events
      17. Literal
        1. Properties
      18. MultiView
        1. Properties
        2. Methods
        3. Events
      19. Panel
        1. Properties
      20. PlaceHolder
        1. Properties
      21. RadioButton
        1. Properties
        2. Events
      22. RadioButtonList
        1. Properties
        2. Events
      23. TextBox
        1. Properties
        2. Events
      24. Xml
        1. Properties
    3. Validation Controls
      1. CompareValidator
        1. Properties
        2. Methods
      2. CustomValidator
        1. Methods
        2. Events
      3. RangeValidator
        1. Properties
        2. Methods
      4. RegularExpressionValidator
        1. Properties
        2. Methods
      5. RequiredFieldValidator
        1. Properties
        2. Methods
      6. ValidationSummary
        1. Properties
    4. Navigation Web Controls
      1. SiteMapPath
        1. Properties
        2. Methods
        3. Events
      2. Menu
        1. Properties
        2. Methods
        3. Events
      3. TreeView
        1. Properties
        2. Methods
        3. Events
    5. HTML Server Controls
      1. HtmlAnchor Control
        1. Properties
        2. Events
      2. HtmlButton Control
        1. Properties
        2. Events
      3. HtmlForm Control
        1. Properties
      4. HtmlGeneric Control
        1. Properties
      5. HtmlImage Control
        1. Properties
      6. HtmlInputButton Control
        1. Properties
        2. Events
      7. HtmlInputCheckBox Control
        1. Properties
        2. Events
      8. HtmlInputFile Control
        1. Properties
      9. HtmlInputHidden Control
        1. Properties
      10. HtmlInputImage Control
        1. Properties
        2. Events
      11. HtmlInputRadioButton Control
        1. Properties
        2. Events
      12. HtmlInputText Control
        1. Properties
        2. Events
      13. HtmlSelect Control
        1. Properties
        2. Events
      14. HtmlTable Control
        1. Properties
      15. HtmlTableCell Control
        1. Properties
      16. HtmlTableRow Control
        1. Properties
      17. HtmlTextArea Control
        1. Properties
        2. Events
  22. Index (1/7)
  23. Index (2/7)
  24. Index (3/7)
  25. Index (4/7)
  26. Index (5/7)
  27. Index (6/7)
  28. Index (7/7)

Product information

  • Title: Build Your Own ASP.NET 2.0 Web Site Using C# & VB, Second Edition
  • Author(s): Cristian Darie, Zak Ruvalcaba
  • Release date: October 2006
  • Publisher(s): SitePoint
  • ISBN: 9780975240281