This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ).ToString ' . .. do the rest of the fields. End Sub This version uses ONE function to check both the username and password. You have to write the class function to do this. Option Strict On Partial Class LoginNoCode Inherits System.Web.UI.Page Dim DB As New ClassCustomerDB Dim Format As New ClassFormat Protected Sub btnLogin_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles btnLogin.Click ' validate input - can't be blank ' check username and password with one function If DB.CheckLogin( Me .txtInUsername.Text, Me .txtInPassword.Text) = False Then lblmsg.Text = "bad login" Exit Sub End If ' it is a good login, so ' make panel visible Me .panel1.Visible = True ' get customer's record and show on form Me .txtLastName.Text = DB.CustDataSet.Tables( "tblcustomers" ).Rows(0).Item( "lastname" ).ToString ' . .. do the rest of the fields. End Sub...
View Full Document
This note was uploaded on 11/29/2010 for the course MIS 333k taught by Professor Staff during the Fall '08 term at University of Texas at Austin.
- Fall '08