Presentation tier scripts -------------------------------------------------- web.config -------------------------------------------------- -------------------------------------------------- Imports statements -------------------------------------------------- Imports System.Configuration.ConfigurationManager Imports System.Data Imports System.Data.SqlClient -------------------------------------------------- Region Directives for code-behind -------------------------------------------------- 'Copy these Region Directives into each new Aspx.Net page #Region " Public objects " #End Region #Region " Click event handlers for page controls " #End Region #Region " Click event handlers for grid views " #End Region #Region " Local subs " Private Sub setFormMode() 'Retrieve the user's profile from session memory 'Dim dtPersonProfile As DataTable = CType(Session("dtPersonProfile"), DataTable) 'If ther user's profile has expired or has not been created (say page was accessed via a bookmark 'favorites, or simply typing the URL), redirect to login 'If dtPersonProfile Is Nothing Then ' Response.Redirect("SignIn.aspx") 'End If End Sub #End Region #Region " Local functions " #End Region #Region " Local utilities " #End Region -------------------------------------------------- Page_Load event PostBack handler -------------------------------------------------- If Not IsPostBack Then SetFormMode() End If -------------------------------------------------- DataSource/DataBind method with Error handling blocks -------------------------------------------------- -------------------------------------------------- Code snippets for html