Expanded contents. Section 1. Chapter 2. The essence off ASP.NET web programming. An introduction to ASP.NET web programming



Similar documents
Transition your MCPD Web Developer Skills to MCPD ASP.NET Developer 3.5 (VB)

ASP.NET Using C# (VS2012)

Visual Basic. murach's TRAINING & REFERENCE

This class is intended for experienced software developers who understand object-oriented programming (OOP) and C# or VB.NET.

DotNet Web Developer Training Program

How to test and debug an ASP.NET application

MOVING THE SENIOR DEVELOPMENT CLASS FROM WEB DEVELOPMENT TO LIFE CYCLE DEVELOPMENT A CASE FOR VISUAL STUDIO 2005

Visual COBOL ASP.NET Shopping Cart Demonstration

MCTS:.NET Framework 4, Web Applications

ASP.NET Overview. Ken Casada Developer Evangelist Developer & Platform Evangelism Microsoft Switzerland


About the Authors About the Technical Reviewer

SelectSurvey.NET Developers Manual

Sample Chapters. To learn more about this book visit Microsoft Learning at:

You can get real. RELIABILITY, PERFORMANCE and EFFECTIVE RESULTS. We Create Skillful Developer

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

multiple placeholders bound to one definition, 158 page approval not match author/editor rights, 157 problems with, 156 troubleshooting,

Kentico CMS 5 Developer Training Syllabus

Dreamweaver CS3 THE MISSING MANUAL. David Sawyer McFarland. POGUE PRESS" O'REILLY 8 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

This course provides students with the knowledge and skills to develop ASP.NET MVC 4 web applications.

ConvincingMail.com Marketing Solution Manual. Contents

Intermediate ASP.NET Web Development with C# Instructor: Frank Stepanski. Data Sources on the Web

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY

VB.NET - WEB PROGRAMMING

Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

metaengine DataConnect For SharePoint 2007 Configuration Guide

Richmond SupportDesk Web Reports Module For Richmond SupportDesk v6.72. User Guide

Dev01: Kentico CMS 7 Developer Essentials Syllabus

2. Modify default.aspx and about.aspx. Add some information about the web site.

Migrating helpdesk to a new server

How To Train Aspnet

Skills for Employment Investment Project (SEIP)

Application Development

Kentico Site Delivery Checklist v1.1

How to create an template

Developing and Implementing Web Applications with Microsoft Visual C#.NET and Microsoft Visual Studio.NET

Tutorial #1: Getting Started with ASP.NET

Hands-On Lab. Web Development in Visual Studio Lab version: Last updated: 12/10/2010. Page 1

G r a p h i c a l A p p l i c a t i o n D e v e l o p m e n t w i t h B o n i t a S t u d i o

Intranet Website Solution Based on Microsoft SharePoint Server Foundation 2010

Kentico CMS 6.0 Tutorial

Dashboard Builder TM for Microsoft Access

SAHARA DIGITAL8 RESPONSIVE MAGENTO THEME

Developing ASP.NET MVC 4 Web Applications MOC 20486

ResPAK Internet Module

COURSE CURRICULUM COURSE TITLE: WEB PROGRAMMING USING ASP.NET (COURSE CODE: )

System Administration Training Guide. S100 Installation and Site Management

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM COURSE TITLE: ADVANCE WEB TECHNOLOGY (COURSE CODE: )

California State University Polytechnic University. CIS 311 Interactive Web Development. Fall 2011

IBM Unica emessage Version 8 Release 6 February 13, User's Guide

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

Developing ASP.NET MVC 4 Web Applications

SQL Server for developers. murach's TRAINING & REFERENCE. Bryan Syverson. Mike Murach & Associates, Inc. Joel Murach

Jim2 ebusiness Framework Installation Notes

Kentico CMS for.net User Groups

Terms and Definitions for CMS Administrators, Architects, and Developers

TARGETPROCESS INSTALLATION GUIDE

Fast track to HTML & CSS 101 (Web Design)

BUILDER 3.0 Installation Guide with Microsoft SQL Server 2005 Express Edition January 2008

maximizing IT productivity

SQL Server Database Web Applications

Developing ASP.NET MVC 4 Web Applications Course 20486A; 5 Days, Instructor-led

JTouch Mobile Extension for Joomla! User Guide

Microsoft.Realtests v by.ERICA.50q

How To Integrate An Ipm With Airwatch With Big Ip On A Server With A Network (F5) On A Network With A Pb (Fiv) On An Ip Server On A Cloud (Fv) On Your Computer Or Ip

ORACLE BUSINESS INTELLIGENCE WORKSHOP

Beginning C# 5.0. Databases. Vidya Vrat Agarwal. Second Edition

PORTAL ADMINISTRATION

The Great Office 365 Adventure

1.264 Lecture 19 Web database: Forms and controls

Design and Functional Specification

Site Configuration Mobile Entrée 4

ACE: Dreamweaver CC Exam Guide

Web Application diploma using.net Technology

GOA365: The Great Office 365 Adventure

Index. AdWords, 182 AJAX Cart, 129 Attribution, 174

Building A Very Simple Web Site

WebSpy Vantage Ultimate 2.2 Web Module Administrators Guide

Data Tool Platform SQL Development Tools

Analytics Configuration Reference

Software Design Specification

Pro SQL Server Reporting Services. Third Edition. mm m. Brian McDonald. Shawn McGehee. Rodney Landrum. Apress*

Vector HelpDesk - Administrator s Guide

MS Enterprise Library 5.0 (Logging Application Block)

Developing and Implementing Windows-Based Applications With Microsoft Visual C#.NET and Microsoft Visual Studio.NET

SharePoint Integration Framework Developers Cookbook

Programming in C# with Microsoft Visual Studio 2010

Installation & User Guide

Ajax Development with ASP.NET 2.0

GoDaddy (CentriqHosting): Data driven Web Application Deployment

RFID Tracking System Installation

Programming Fundamentals of Web Applications Course 10958A; 5 Days

Using SQL Reporting Services with Amicus

USER GUIDE Deploying Your Application to WinHost

Learn how to upgrade existing Sitefinity projects, created with a previous version, and use them with the latest Sitefinity version.

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

Elgg 1.8 Social Networking

FUNCTIONAL OVERVIEW VERSION: 1.0

Hands-On Lab. Building a Data-Driven Master/Detail Business Form using Visual Studio Lab version: Last updated: 12/10/2010.

Transcription:

TRAINING & REFERENCE murach's web programming with C# 2010 Anne Boehm Joel Murach Va. Mike Murach & Associates, Inc. I J) 1-800-221-5528 (559) 440-9071 Fax: (559) 44(M)963 murachbooks@murach.com www.murach.com

Section 1 Chapter 1 The essence off ASP.NET web programming An introduction to ASP.NET web programming An introduction to web applications 4 Two pages of a Shopping Cart application 4 The hardware and software components for web applications 6 How static web pages work 8 How dynamic web pages work 10 How state is handled in ASP.NET applications 12 An introduction to ASP.NET application development 14 The software you need 14 The components of the.net Framework 16 Three environments for developing ASP.NET applications 18 A quick preview of how an ASP.NET application works 20 The files used by the Shopping Cart application 20 The aspx code for the Order form 22 The C# code for the Order form 24 How an ASP.NET application is compiled and run 26 Chapter 2 How to develop a one-page web application How to work with ASP.NET web sites 32 How to start a new web site 32 How to add a web form to a web site 34 How to work with the Visual Studio IDE 36 How to add folders and files to a web site 38 How to open or close an existing web site 40 How to use Design view to build a web form 42 The design of the Future Value form 42 How to use flow layout 44 How to add a table to a form 46 How to add text to the cells of a table 46 How to add server controls to a form 48 How to set the properties of the controls 48 Common properties for web server controls 50 How to work in Source and Split views 52 How to use Source view to modify the design 52 How to use Split view to work with the design 54 How to use code snippets 56 The aspx code for the Future Value form 58 How to add validation controls to a form 60 An introduction to the validation controls 60 How to use the required field validator 62 How to use the range validator 62 How to add code to a form 64 How to use the Code Editor 64 How to use page and control events 66 The C# code for the Future Value form 68

How to test a web application 70 How to run a web site with the built-in development server 70 How to review the HTML that's sent to the browser 72 Chapter 3 How to develop a multi-page web application The Shopping Cart application 78 The Order page 78 The Cart page 80 The files and folders used by the Shopping Cart application 82 How to add a class to a web site 84 Six skills for working with multiple web forms 86 files and folders 86 How to create a web site with starting How to rename a web form 88 How to change the starting web form 88 How to redirect or transfer to another page 90 How to use cross-page posting 92 How to code absolute and relative URLs 94 How to create and use data sources 96 How to create an Access data source 96 How to configure an Access data source 98 How to bind a drop-down list to a data source 100 How to use C# code to get data from a data source 102 How to use session state 104 How session state works 104 How to work with data in session state 106 The code for the Shopping Cart application 108 The code for the Product class 108 The code for the Cartltem class 108 The code for the CartltemList class 110 The aspx code for the Order page 112 The C# code for the Order page 116 The aspx code for the Cart page 118 The C# code for the Cart page 120 Chapter 4 How to test and debug an ASP.NET application How to test an application using the ASP.NET Development Server... 128 How to test an application with the default browser 128 How to test an application with a browser other than the default 130 How to use the Exception Assistant 132 How to test an application using IIS 134 How to create a local IIS web site 134 How to test a file-system web site with IIS 136 How to test an application from outside of Visual Studio 138 How to use the debugger 140 How to use breakpoints 140 How to use tracepoints 142 How to work in break mode 144 How to control the execution of an application 146 How to use the Autos, Locals, and Watch windows to monitor variables 148 How to use the Immediate window to work with values 150

How to use thetrace feature 152 How to enable the Trace feature 152 How to interpret Trace output 152 How to create custom trace messages 154 How to write information directly to the HTTP output stream 156 Chapter 5 A crash couse in HTML and CSS An introduction to HTML 162 Basic rules for coding HTML elements 162 How to work with HTML using Visual Studio 164 How web server controls are rendered 166 How to code HTML documents 168 The basic structure of an HTML document 168 The Page directive 170 The Doctype declaration 170 How to code block elements 172 How to code inline elements 174 Basic skills for using CSS 176 How to include CSS in a web page 176 How to code CSS rule sets and comments 178 How to code selectors for elements, IDs, and classes 180 A Future Value page that uses CSS 182 The aspx code for the Future Value form 184 The CSS for the Future Value form 186 Visual Studio features for working with CSS 190 How to work with styles from Design view 190 How to add style rules 192 How to create and edit external style sheets 194 How to use the Apply Styles window 196 How to use the CSS Properties window 198 window 200 How to use the Manage Styles Section 2 Basic ASP.NET skills Chapter 6 How to work with server controls An introduction to server controls 208 Types of server controls 208 The web server controls presented in this chapter 210 How to handle control events 212 How to use access keys with web server controls 214 How to set the focus on a web server control 214 How to set the default button control 214 How to work with button controls 216 How to work with buttons, link buttons, and image buttons 216 How to use the e argument of an image button control 218 How to use the Command event 220 How to work with text boxes, labels, check boxes, and radio buttons 222 How to work with text boxes and labels 222 How to work with check boxes and radio buttons 224 C# code for working with these controls 226

ix How to work with list controls 228 Basic skills for working with list boxes and drop-down lists 228 Properties for working with list boxes, drop-down lists, and list items 230 Properties and methods for working with list item collections 232 How to use the Listltem Collection Editor 234 How to work with radio button lists and check box lists 236 How to work with bulleted lists and numbered lists 238 How to use other web server controls 240 How to get the information you need for using a control 240 How to use the image control 242 How to use the hyperlink control 242 control 244 How to use the file upload How to use the image map control 246 How to use the calendar control 248 Chapter 7 How to use the validation controls An introduction to the validation controls 254 How to use the validation controls 254 Common validator properties 256 How ASP.NET processes validation controls 258 How to use the basic validation controls 260 How to use the required field validator 260 How to use the compare validator 262 How to use the range validator, 264 Validation techniques 266 How to use the validation summary control 266 How to use validation groups 268 How to use the advanced validation controls 270 How to use the regular expression validator 270 How to create your own regular expressions 272 How to use a custom validator 274 A validation routine that validates credit card numbers 276 Chapter 8 How to manage state How to use view state 282 How to work with view state 282 How to use view state for your own data 284 How to use session state 286 How to work with session state 286 When to save and retrieve session state items 288 Options for storing session state data 290 Options for tracking session IDs 290 How to set session state options 292 How to use application state 294 How application state works 294 How to work with application state data 296 How to work with application events 298 How to use cookies and URL encoding 300 How to create cookies 300 How to work with cookies 302 How to enable or disable cookies 304 How to use URL encoding 306

X Expanded contents Chapter 9 How to use master pages How to create master pages 312 An introduction to master pages 312 How to create a master page 314 The aspx code for a new master page 316 The aspx code for the Halloween Store master page 318 The code-behind file for the master page 320 How to create and develop content pages 322 How to create a content page 322 How to add content to a page 324 The aspx code for the Order content page 326 How to nest master pages 328 How to create nested master pages 328 How to add content to a child master page 328 How to access master page controls from a content page 330 How to expose a master page control as a public property 330 How to access a public property of the master page from a content page 332 Chapter 10 How to use site navigation An introduction to site navigation 338 An introduction to the navigation controls 338 How to create a web. sitemap file 340 The web.sitemap file for the Navigation application 342 How to use the site navigation controls 344 How to use the TreeView control 344 How to create a SiteMapDataSource control 346 How to use the Menu control 348 How to use the SiteMapPath control 350 A master page for the Navigation application 352 Chapter 11 How to use themes An introduction to themes 358 A page before and after a theme has been applied 358 How themes work 360 How to create themes 360 How to work with skins 362 How to create and use skins 362 Another way to store skins 364 How to use customization themes 366 How to apply a customization theme to an application 366 How to apply a customization theme to a page 366 How to apply a skin to a control 366 How to remove a customization theme from an application 368 How to remove a customization theme from a page 368 How to remove a customization theme from a control 368 How to use style sheet themes 370 How to apply a style sheet theme 370 How to remove a style sheet theme 370

Xi Section 3 ASP.NET database programming Chapter 12 An introduction to database programming An introduction to relational databases 378 How a table is organized 378 How the tables in a database are related 380 How the columns in a table are defined 382 The design of the Halloween database 384 How to use SQL to work with the data in a relational database 386 How to query a single table 386 How to join data from two or more tables.-. 388 How to add, update, and delete data in a table 390 An introduction to ADO.NET 4 392 How the basic ADO.NET components work 392 Concurrency and the disconnected data architecture 394 How to work with data without using a data adapter 396 An introduction to the ADO.NET 4 classes 398 The SqlConnection class 398 The SqlCommand class 398 The SqlParameter class 400 The SqlDataReader class 400 The SqlDataAdapter class 400 Chapter 13 How to use SQL data sources How to create a SQL data source 404 A Product List application that uses two SQL data sources 404 How to create a SqlDataSource control 406 How to define the connection '. 408 How to save the connection string in the web.config file 410 How to configure the Select statement 412 How to create a Where clause 414 How select parameters work 416 How to use custom statements and stored procedures 418 How to enter custom statements 418 How to select stored procedures 418 How to create a Select statement with the Query Builder 420 How to define the parameters 422 How to use the DataList control 424 How the DataList control works 424 How to define the templates for a data list 426 How to format a data list 428 How to use data binding 430 How to bind a list control to a data source 430 How to bind the controls in a template 432 The aspx file for the Product List application 434 How to use the advanced features of a SQL data source 436 How to create a data source that can update the database 436 How to change the data source mode 438 How to use caching 438

Chapter 14 How to use the GridView control How to customize the GridView control How the GridView control works How to define the fields in a GridView control Elements used to create and format fields How to enable sorting How to enable paging How to customize paging A list application that uses a GridView control The Product List application The aspx file... How to update GridView data How to work with command fields How to use events raised by the GridView control How to insert a row in a GridView control A maintenance application that uses a GridView control The Category Maintenance application The aspx file The code-behind file How to work with template fields How to create template fields The template version of the Category Maintenance application The aspx code for the template version Chapter 15 How to use the DetailsView and FormView controls How to use the DetailsView control 484 An introduction to the DetailsView control Attributes and child elements for the DetailsView control How to define the fields in a DetailsView control How to enable paging How to create a Master/Detail page How to update DetailsView data An introduction to command buttons How to add command buttons How to use events raised by the DetailsView control How to create template fields The Product Maintenance application The operation of the application The aspx file The code-behind file How to use the FormView control An introduction to the FormView control How to work with the Item template How to work with the Editltem and Insertltem templates A Shopping Cart application that uses a FormView control The operation of the application The aspx file for the Order page The code-behind file for the Order page

XMi Chapter 16 How to use the ListView and DataPager controls How to use the ListView control 524 An introduction to the ListView control 524 How to configure a ListView control 526 How to work with the Layout template 528 How to work with the Item template 530 How to provide for sorting 532 How to provide for paging 534 How to customize paging 536 A list application that uses a ListView control 538 The Product List application 538 The aspx file 540 How to group ListView data 544 How to define the templates for a group 544 A Product List application that uses groups 546 The aspx file for the grouped Product List application 546 How to update ListView data 550 How to use buttons to perform update operations 550 How to work with the Editltem and Insertltem templates 552 How to use events raised by the ListView control 552 A maintenance application that uses a ListView control 554 The Category Maintenance application 554 The aspx file 556 The code-behind file 556 Chapter 17 How to use object data sources An introduction to object data sources.. 566 How 3-layer applications work in ASP.NET 566 How to use the ObjectDataSource control 568 control 570 How to configure an ObjectDataSource How to work with bound controls 570 A Product List application 572 The aspx file 574 The ProductDB class 576 How to create a data access class 578 How to design a data access class 578 How to create a select method 580 How to create update, delete, and insert methods 582 How to use attributes to mark a data access class 584 A Category Maintenance application 586 The design 586 The aspx file 586 The code-behind file 590 The Category class 592 The CategoryDB class 594 How to use paging with object data sources 598 How to create an ObjectDataSource control that provides for paging 598 How to create a data access class that provides for paging 600

Section 4 Chapter 18 Professional ASP.NET skills How to secure a web site An introduction to SSL 608 How secure connections work 608 How digital secure certificates work 610 How to determine if a digital secure certificate is installed on your server 610 How to get and use a digital secure certificate 612 How to get a digital secure certificate 612 How to work with certificates using IIS 7 614 How to work with certificates using earlier versions of IIS 616 How to use a secure connection 618 How to request a secure connection 618 How to force a page to use a secure connection 620 A Halloween Store application that uses SSL 622 The operation of the Halloween Store application 622 The code for the Halloween Store application 622 Chapter 19 How to authenticate and authorize users An introduction to authentication 628 Three types of authentication 628 How forms-based authentication works 630 How to set up authentication and authorization 632 How to start the Web Site Administration Tool 632 How to enable forms-based authentication 634 How to create and manage roles 636 How to create and manage users 638 How to create and manage access rules 640 How to modify the membership and role provider 642 How to use the login controls 644 How to use the Login control 644 How to use the LoginStatus and LoginName controls 646 How to use the CreateUserWizard control 648 How to use the PasswordRecovery control 650 How to use the ChangePassword control 652 How to use the Login View control 654 The Authentication application 656 The pages 656 The directory structure 660 The access rules 660 The web.config files 662 Chapter 20 How to use email, custom error pages, and back-button control How to send email 666 An introduction to email 666 How to install an SMTP server 668 How to create an email message 670 How to send an email message 672 How to add an attachment to an email message 674 How to create an HTML message 676

How to use custom error handling 678 An introduction to custom error handling 678 How to get and use the Exception object for an error 680 How to code methods that redirect to a custom error page 682 The code for a custom error page 684 How to handle HTTP errors with the web.config file 686 How to handle the back-button problem 688 An introduction to the back-button problem 688 How to disable browser page caching 690 How to use timestamps to avoid the back-button problem 692 Chapter 21 How to use AJAX An introduction to AJAX 696 AJAX concepts 696 How AJAX works 698 An introduction to ASP.NET AJAX 700 How ASP.NET AJAX works 700 The ASP.NET AJAX server controls 702 The ASP.NET AJAX Control Toolkit 704 How to use the ASP.NET AJAX server controls 706 How to use the ScriptManager control 706 How to use the ScriptManagerProxy control 708 How to use the UpdatePanel control 710 How to use the Timer control 712 How to use the UpdateProgress control 714 An application that uses AJAX 716 The Shout Box application 716 The Shoutltem class 718 The ShoutltemList class 718 The aspx file 720 The code-behind file 724 An introduction to jquery 726 The core jquery library 726 The jquery UI library 726 How jquery AJAX works 728 Chapter 22 How to configure and deploy ASP.NET 4 applications How to configure an ASP.NET application 732 How to use the Web Site Administration Tool 732 How to use the US Management Console with Windows 7 or Windows Vista 734 How to use the US Management Console with Windows XP 736 How to deploy an ASP.NET application 738 Three ways to deploy an ASP.NET application 738 How to use the Copy Web Site command for XCopy deployment 740 How to use the Publish Web Site command for precompiled deployment 742 How to use the aspnet_compiler command for precompiled deployment 744 How to create a Web Setup project 746 How to create and use a Setup program 748

XVi Expanded contents Chapter 23 An introduction to WCF services Basic concepts and terms 752 How WCF services work 752 An introduction to bindings 754 How to create a WCF service 756 How to start a WCF service library 756 How to develop the code for a WCF service library 758 The code for a WCF service that gets product information 760 The configuration file for the WCF service 760 How to test a WCF service 764 How to create a web site that hosts a WCF service library 766 How to start a host web site 766 How to add a reference to a service library 766 The configuration files for the host web site 768 How to display information about the service in a browser 770 How to create a web site that consumes a WCF service 772 How to add a service reference to a client web site 772 How to consume a WCF service 774 Appendix A How to install and use the software and downloadable files How to download and install the files for this book 778 How to install IIS under Windows 7 or Windows Vista 780 How to install IIS under Windows XP 782 How to install Visual Studio 2010 784 How to install and use SQL Server 2008 Express 786 How to create the Halloween database 788 How to use the downloaded web applications 790 Appendix B How to work with web applications using IIS under Windows 7 and Windows Vista How to create an IIS virtual directory or application 794 How to set the default page for a web site 796 How to force a page to use a secure connection 798 How to work with application pools 800 Appendix C How to work with web applications using IIS under Windows XP How to create a virtual directory 804 How to set the default page for a web site 806 How to force a page to use a secure connection 808