Professional Documents
Culture Documents
Applications Using
Microsoft® Visual
Studio® 2008
Module 3: Creating a Microsoft ASP.NET Web Form
• Creating Web Forms
Server controls:
• Contain runat="server" attribute
Events happen on the server
View state saved
<asp:ListBox ID="ListName"
EnableViewState="true" runat="server">
</asp:ListBox>
• Control state
Use view state to maintain the control's contents
Use control state to maintain the core behavior of the
control
• HiddenField control
HTML Server Controls
• Based on HTML elements
• Exist in the
System.Web.UI.HtmlControls
namespace
<asp:TextBox id="TextBox1"
runat="server">Text_to_Display
</asp:TextBox>
• Content Pages
Logon information
Master Page
Logon Page benefitsMaster.master
login.aspx
Benefits Lab Web
Home Page Application
ASPState
Default.aspx Page Header
header.ascx
Menu Component
Registration Benefits.cs or Benefits.vb
register.aspx TempDB
Web.
config
Prospectus
prospectus.aspx Doctors User Control XML Web
LINQ to SQL doctors.aspx nameDate.ascx Service
Classes DentalService1.asmx
Doctors.dbml
Doctors Dentists
XML Files
Lab Review
Review Questions
• What categories of server controls are used in the lab?
• Best Practices