Creating ASP.NET Web Applications
Course FB20A2 – 4 days – Framework 2.0
BLOCK 1: What is ASP.NET?
BLOCK 2: Creating a Simple Web Application
BLOCK 3: Using Advanced Server Controls
BLOCK 4: Working with Multiple Pages
BLOCK 5: Styles and Formats
BLOCK 6: Working with Data
BLOCK 7: Creating Custom Controls
BLOCK 8: State and Caching
BLOCK 9: Securing a Web application
BLOCK 10: Configuration, Monitoring and Deployment
BLOCK 11: Miscellaneous Topics
Detailed:
BLOCK 1: What is ASP.NET? 10
ASP.NET Execution Model 10
Configuration 11
BLOCK 2: Creating a Simple Web Application 12
Module 2.1: Starting a Project with Visual Studio 12
Project template 12
Project directory on IIS 13
File System Project 14
File types 14
Running the Application 15
Module 2.2: Creating the User Interface 16
Control Types 16
User controls 17
HTML code 17
Adding Simple Controls 19
Using the ToolBox 19
Label, Textbox, Button 20
Checkbox 23
RadioButton 24
HyperLink 25
LinkButton 26
Calendar 26
Image 27
Table, TableRow and TableCell 28
Literal 28
DropDownList 29
Loading Controls dynamically 30
BLOCK 3: Using Advanced Server Controls 31
Module 3.1 User Interface Controls 31
ImageButton 31
ImageMap 31
FileUpload 32
AdRotator 34
Panel 35
XML Control 35
Wizard Control 36
Module 3.2: Validation Controls 39
Client versus Server side validation 39
Validation Controls 39
Examples of usage 40
ValidationGroups 42
Feedback with Images and Sounds 42
Enumerating Validators 43
BLOCK 4: Working with Multiple Pages 44
Module 4.1: An ASP.NET Page 44
Create ASP.NET pages 44
Adding a new page 44
Add and set Directives on ASP.NET pages 46
Separate user interface resources from business logic 47
Module 4.2: Page Navigation and User State 49
Navigation in Code 50
Navigation 50
Managing state - introduction 50
View State 51
Postbacks 51
The Transfer method 52
The Execute method 52
The Window.Open method 53
Navigation Controls 54
The SiteMapPath Control 55
The TreeView Control 57
The Menu Control 61
URL Mapping 62
Miscellaneous 63
Module 4.3: Events 64
The life cycle of a web application 64
Application and Session Events 64
Page events 66
Server Control Events 67
BLOCK 5: Styles and Formats 69
Module 5.1: Layout 69
Set styles using CSS 69
Themes and Skins 73
Creating Themes 73
Applying Themes Declaratively 74
Applying Themes Programmatically 75
Themes Miscellaneous 76
Working With Images 76
Module 5.2: Master and Content Pages 78
What is a Master Page? 78
Creating a Master Page 78
Creating Content Pages 79
Nesting Master Pages 82
Addressing the Browser Type 84
Event Sequence 85
BLOCK 6: Working with Data 86
Module 6.1: ADO.NET 86
ADO.NET Overview 86
Introduction 86
Disconnected model 86
Provider specific 87
Optimized for XML 87
ADO.NET Objects 88
Connection 89
Create, Open and Close 89
Transactions 90
The Dataset 92
Introduction 92
Creating a Dataset 93
The DataTable 93
The DataView 95
DataRelations 96
Constraints 97
Typed and Untyped DataSets 99
Updating Data 102
Changing Data in the DataSet 102
Updating with the DataAdapter 102
Updating manually 103
Dealing with conflicts 104
The Command 105
Calling a Stored Procedure 105
ExecuteScalar 106
ExecuteNonQuery 106
ExecuteReader 107
The DataReader 108
Module 6.2: Data Binding in ASP.NET 109
New Data Source Provider Model 109
DataSourceControls 110
Creating Connection with Wizard 114
Managing ConnectionStrings in Web.Config 115
Simple DataBound Controls 117
Rich DataBound Controls 119
GridView 119
Module 6.3: Working with XML Data 126
Introduction 126
DOM and XMLReader 127
What is the DOM? 127
The XmlReader class 127
The XmlDocument class 128
DataSet and XmlDataDocument 130
Use XPath to query XML Data 131
What is XPath? 131
XPath Expressions 131
XPath Navigator 133
Generate and use an XSD Schema 135
What is an XSD Schema? 135
Use scenarios 135
Creating an XSD schema using Visual Studio 135
Creating an XSD schema in code 137
Validate an XML Document 139
BLOCK 7: Creating Custom Controls 140
Web User Controls 140
Composite Custom Controls 140
Superclassing Server Controls 140
Rendered Custom Controls 140
Web User Controls 141
Combine HTML and Server controls 141
File-based, not Toolbox based 141
Designing the control 141
Using the control 141
Superclassing Server Controls 143
Rendered Custom Controls 144
Composite Custom Controls 147
Separate project ‘Web Control Library’ 147
Combine HTML and Server controls 147
Compiles into a dll 149
Templated Control 150
Control Extras 156
Adding to Toolbox 156
Toolbox Icon 156
BLOCK 8: State and Caching 157
Module 8.1: Server-Side State 158
Session State 158
Introduction 158
Session State 158
Writing and reading Session State 159
Disabling State 160
Application State 161
Module 8.2: Client-Side State: Cookies 162
Reading Cookies with the Request Object 162
Setting Cookies with the Response object 164
Module 8.3: Caching 165
Introduction 165
Configure and implement Caching 165
Output Caching 166
Fragment Caching 167
Introduction 167
Use the Cache API 167
Additional properties 168
Guidelines for Data objects 169
SQL Cache Invalidation 170
What is SQL Cache Invalidation? 170
Creating a SQL Cache Invalidation 170
BLOCK 9: Securing a Web application 172
Module 9.1: ASP and IIS Security 172
Overview 172
Securables 173
ASP.NET Security 174
Windows authentication 174
Forms authentication 174
Passport authentication 176
Custom authentication 177
IIS Security 178
Introduction 178
Anonymous 178
Integrated Windows Authentication 179
Digest 179
Basic 179
.NET Password Authentication 180
Security extras 181
File and directory access 181
Impersonation 182
SSL Encryption 182
Module 9.2: Membership and Role Management 184
Introduction 184
Login Controls 184
Database 184
Management Tools 185
Setting Up Membership Provider 186
Creating the Provider 186
Creating the Database 187
Login Controls 189
Logging in to a Website 189
Membership in Code 196
Role Management 198
The LoginView control 200
Management Tools 201
Module 9.3: Personalization 204
Introduction 204
Steps 204
Walkthrough 204
BLOCK 10: Configuration, Monitoring and Deployment 207
Module 10.1: Testing and Debugging 207
Debugging and Tracing 207
Introduction 207
Difference between the Debug and Trace objects 207
The Debug object 208
The Trace object 209
Using System.Diagnostics.Trace 209
Tracing after compilation 210
Application and Page level tracing 211
Web Enabled Tracing 211
Remote Tracing 211
Custom Trace Messages 212
Conditional Compilation 214
Introduction 214
The DEBUG Directive 214
Custom Directives 214
Remote Debugging 215
Introduction 215
Prerequisites 215
Attaching and debugging 215
The MSVSMON Tool 216
Module 9.2: Deploying a Web application 219
Plan the deployment of a Web application 220
XCOPY Deployment 220
Deployment to a Web garden or Web farm 220
Create a setup program 222
Web Setup Project 222
Installing the application 223
Uninstalling the application 225
Copy Web Site Feature of Visual Studio 226
Add assemblies to the GAC 229
Install 229
Use from GAC 229
Multiple versions 230
Native Images using ngen.exe 230
Module 10.3: Configuring a Web Application 231
The config files 231
The Web.Config files 231
The Machine.config file 231
Add and modify application settings 232
BLOCK 11: Miscellaneous Topics 234
Web Parts 234
Introduction 234
Web Parts Essentials 234
Developer Scenarios for Using Web Parts 236
Dos and Don’ts for optimization 237
Performance tips 237
Common misunderstandings 238
Using ActiveX Controls 239
Implement globalization 241
Globalization Approaches 241
Detecting the user’s culture 241
Satellite assemblies 243
Setting culture in Web.Config 245