Module 7: Building Web Applications
Module 7: Building Web Applications
Applications
Overview
Introduction to ASP.NET
Creating Web Form Applications
Building Web Services
Using Web Services
Introduction to ASP.NET
Overview of ASP.NET
Using Response and Request Objects
Maintaining Client-Side State
Maintaining Server-Side State
Managing an ASP.NET Application
Overview of ASP.NET Security
Using Global Events with Global.asax
Overview of ASP.NET
Code behind development
Intuitive approach to development similar to Windows Forms
Code can be compiled using any .NET-compatible language
Significant performance improvement
ASP.NET pages run side-by-side with ASP pages
Files with the .aspx extension run side-by-side with current
ASP applications on IIS
Automatic support for multiple browsers
Rich DHTML, HTML 3.2, and small devices
ASP.NET namespaces provide rich functionality
Built-in support for Web Services
Using Response and Request Objects
Dim
Dim strValue
strValue As
As String
String == Request.Form("txtInput")
Request.Form("txtInput")
Sub
Sub Application_Start(ByVal
Application_Start(ByVal Sender
Sender As
As Object,
Object, ByVal
ByVal ee As
As EventArgs)
EventArgs)
Application("SessionCounter")
Application("SessionCounter") == 00
End
End Sub
Sub
Sub
Sub Session_Start(ByVal
Session_Start(ByVal Sender
Sender As
As Object,
Object, ByVal
ByVal ee As
As EventArgs)
EventArgs)
Application("SessionCounter")
Application("SessionCounter") == Application("SessionCounter")
Application("SessionCounter") ++ 11
Session("StartTime")
Session("StartTime") == Now
Now
End
End Sub
Sub
Sub
Sub Session_End(ByVal
Session_End(ByVal Sender
Sender As
As Object,
Object, ByVal
ByVal ee As
As EventArgs)
EventArgs)
Application("SessionCounter")
Application("SessionCounter") == Application("SessionCounter")
Application("SessionCounter") -- 11
End
End Sub
Sub
Creating Web Form Applications
<tags> code
Logon.aspx Logon.aspx.vb
Using HTML Controls
Rich functionality
Example: Calendar or RadioButtonList control
Using Web Server Controls
Intrinsic controls
List controls for repetition
Validation controls validate input
Rich controls simplify common
Web page requirements
Handling Events
Sub
Sub btnSubmit_Click(…)
btnSubmit_Click(…) Handles
Handles btnSubmit.Click
btnSubmit.Click
Dim
Dim usr
usr As
As New
New Services.User()
Services.User() 'Services
'Services is
is the
the given
given namespace
namespace
MessageBox.Show(usr.AddUser(txtName.Text))
MessageBox.Show(usr.AddUser(txtName.Text))
End
End Sub
Sub
Demonstration: Using a Web Service
Multimedia: How Web Services Work
Lab 7.2: Creating and Using the CustomerService Web
Service
Review
Introduction to ASP.NET
Creating Web Form Applications
Building Web Services
Using Web Services