Private Sub cmdLogin_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles cmdLogin.Click
'Declare connection string and assign
'a value to it.
Dim str1 As String = "Data Source=PROSERVER;" & _
"Initial Catalog=SqlMagMemberApp;" & _
"Integrated Security=SSPI"
'Instantiate a connection.
Dim cnn1 As SqlClient.SqlConnection = _
New SqlClient.SqlConnection(str1)
cnn1.Open()
'Declare command to validate MemberID and
'password.
Dim cmd1 As SqlClient.SqlCommand = cnn1.CreateCommand
cmd1.CommandType = CommandType.StoredProcedure
cmd1.CommandText = "IsValidMember"
Dim prm1 As SqlClient.SqlParameter = _
cmd1.Parameters.Add("@OK", SqlDbType.Int)
prm1.Direction = ParameterDirection.ReturnValue
Dim prm2 As SqlClient.SqlParameter = _
cmd1.Parameters.Add("@inID", SqlDbType.NVarChar, 8)
prm2.Direction = ParameterDirection.Input
Dim prm3 As SqlClient.SqlParameter = _
cmd1.Parameters.Add("@inpassword", SqlDbType.NVarChar, 30)
prm3.Direction = ParameterDirection.Input
Dim prm4 As SqlClient.SqlParameter = _
cmd1.Parameters.Add("@inMemberlw", SqlDbType.NVarChar, 15)
prm4.Direction = ParameterDirection.Input
prm2.Value = txtMemberID.Text
prm3.Value = txtPassword.Text
prm4.Value = listMemberLW.Text
cmd1.ExecuteNonQuery()
'Accept the return value:
'1 if valid
'0 otherwise
Dim count As Byte = _
CByte(cmd1.Parameters("@OK").Value)
If count = 1 Then
Session("MemberID") = txtMemberID.Text
Session("MemberPW") = txtPassword.Text
Session("LoggedIn") = True
Response.Redirect("nextpage.aspx")
'
this is my code i have used storedprocedure to check id and password..
but the fault is the password and id accepts if typed with capslock on or off..
i hope u understand my query