Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As AuthenticateEventArgs) Dim Authenticated As Boolean = False Authenticated = SiteLevelCustomAuthenticationMethod(Login1.UserName, Login1.Password) e.Authenticated = Authenticated If Authenticated = True Then Response.Redirect("Home.aspx") End If End Sub Private Function SiteLevelCustomAuthenticationMethod(ByVal UserName As String, ByVal Password As String) As Boolean Dim boolReturnValue As Boolean = False ' Insert code that implements a site-specific custom ' authentication method here. ' This example implementation always returns false. Dim strConnection As String = "server=dtpxp-skumari;database=master;uid=sa;pwd=;" Dim Connection As New SqlConnection(strConnection) Dim strSQL As String = "Select * From Employee" Dim command As New SqlCommand(strSQL, Connection) Dim Dr As SqlDataReader Connection.Open() Dr = command.ExecuteReader() While Dr.Read() If (UserName = Dr("name").ToString()) And (Password = Dr("Password").ToString()) Then boolReturnValue = True End If Dr.Close() Return boolReturnValue End While End Function
Join the community of 500,000 technology professionals and ask your questions.