hi, i need to make a login page on my asp.net site. I have no idea really how to do it, but i have 2 text boxes, and an access database with usernames, and passwords....
Protected Sub btnLogin_Click( ByVal sender As Object, ByVal e As System.EventArg s) Handles btnLogin.Click
lblMessage.Text = ""
If Page.IsValid Then
Dim a As String
a = Encrypt(txtPass word.Text)
objpropLogin.Us erID = txtUserName.Tex t
objpropLogin.Pa ssword = a
i = objbalLogin.use rlogin(objpropL ogin)
If i = 0 Then
lblMessage.Text = "Invalid Login Information"
txtUserName.Tex t = ""
txtPassword.Tex t = ""
End If
End If
End Sub
=============== ======
static admin creation
Protected Sub Button1_Click(B yVal sender As Object, ByVal e As System.EventArg s) Handles Button1.Click
Dim cn As New SqlConnection()
Dim str As String
cn.ConnectionSt ring = "Data Source=169.254. 217.4;Initial Catalog=aashvee ;User ID=sa;Password= angels"
cn.Open()
Dim cmd As SqlCommand
Dim UserId As String
UserId = "admin"
Dim Password As String
Password = "admin"
Dim FirstName As String
FirstName = "admin"
Dim LastName As String
LastName = "admin"
Dim City As String
City = "Ahmedabad"
Dim Country As String
Country = "India"
Dim Gender As String
Gender = "Female"
Comment