Introduction to ASP .NET Using VB .NET

Download Report

Transcript Introduction to ASP .NET Using VB .NET

CIS 264 - ASP
Tim Brown
.html
www
.html
www
.html
www
.html
www
.html
www
JavaScript
VBScript
.html
.cgi
www
JavaScript
VBScript
Perl
.html
OS
.cgi
www
JavaScript
VBScript
Perl
db
.html
.cgi
www
.asp
JavaScript
VBScript
VBScript
JScript
Perl
db
.html
.cgi
www
.asp
db
ASP .NET Requirements
1. IIS 5.0 or higher (or equivalent)
(component of XP Pro, Vista, and Win 7)
2. Development Environment or Text Editor
(Visual Studio is optional, but recommended)
Overview of Unit 1
1.
2.
3.
4.
5.
6.
Create Web Forms
Code-behind files
Redirection
Validation controls
State Preservation
Master Pages
Overview of Unit 2
1.
2.
3.
4.
5.
6.
Site Navigation
Themes
Data Sources
ListView control
Gridview Control
DetailsView and FormView controls
Overview of Unit 3
1. ListView and DataPager Controls
2. Object Data Sources
3. LINQ data sources
4. Optional: SSL, Authentication, Authorization
5. Optional: User Controls, Custom Controls
6. Optional: Web Services
Visual Studio Advantages
• Solution Explorer - file, folder, and project
management tools.
• Intellisense – syntax assistance
• HTML editor – WYSIWYG page design
• Debugger – step-by-step execution
Web Form Control Types
•
•
•
•
•
HTML
HTML Server
ASP (Web) Server
Validation
User and Custom
Server control benefits
•
•
•
•
Server side event procedures
State preservation
Data binding
Browser-version sensitive
<asp:controlType id=“name”
… runat=“server” />
controlType is the type of control
(Label, TextBox, Button, etc.)
name is an identifier used to refer to
the control from code
<asp:controlType id=“name”
… runat=“server” >
</asp:controlType>
controlType is the type of control
(Label, TextBox, Button, etc.)
name is an identifier used to refer to
the control from code
<asp:Label
id=“name”
text=“caption”
runat=“server” />
<asp:TextBox
id=“name”
text=“caption”
…
runat=“server” />
<asp:Button
id=“name”
text=“caption”
…
runat=“server” />
Page Directive Attributes
• Language
– specifies lanuage of embedded code
• Codebehind
– specifies file name of code-behind file
• Inherits
– name of class aspx will inherit from
• AutoEventWireup
– automatically associates page events with
event procedures having correct names
Page and Control Events
• InitializeComponent
• Page_Init
• Page_Load
Exercise 1