Introduction to ASP.NET

  What’s new

  •   ASPX instead of ASP
  •   Object Oriented
  •   Object Model
  •   Type Safe – no variant
  •   Multiple Languages
  •   Compiled
  •   Code Behind

  Parts of an ASP.NET Page

  •   Web Form
  •   Code Behind
  •   HTML Server Controls
  •   Web Server Controls
  •   Validation Controls
  •   User Controls

  Web Forms

  •  <form runat=“server”>
  • Only one per page
  •  Posts back to the same page (itself)

  Code Behind

  •   Contains back end code
  •   Separates page logic from page layout
  •  Generates code automatically for design time actions
  •  Creates handlers for events as required

  HTML Server Controls

  •  Look and feel like normal HTML elements
  •   Equivalents for all standard elements available
  •  Adds runat=“server” to the control
  •  Allows server side interaction with controls  (  Not possible with HTML elements)

  Web Server Controls

  •   Recommended way to use and create controls
  •  Lots of controls available out of the box
  •   Includes DataGrid, DataList, Repeater and more
  •   Contain full Object Model:
  1. Properties
  2.   Events
  3.   Methods
  • Automatic browser detection and rendering

  Validation Controls

  •   Controls that allow input validation
  •   Work at:   Client side (JavaScript),   Server Side
  •   Currently present are:
  1. RequiredFieldValidator
  2.  CompareValidator
  3.   RangeValidator
  4.   RegularExpressionValidator
  5.   CustomValidator
  6.   ValidationSummary

  User Controls

  1. User created controls
  2.  Can be re-used in other Web pages
  3.   Requires no extra knowledge
  4.   Use file extension of ASCX
  1. No comments yet.