hi,
there... im having problem with this codings. these codings are meant for login purpose. i dont knw where ive gone wrong. are these the only codes, or are there any other codes that ive not included... please help
<%@ Page Language="VB" %>
<script language="VB" runat="server">
Sub btnLogin_OnClick(Src As Object, E As EventArgs)
If txtID.Text = "user" And txtPasswrd.Text = "pass" Then
FormsAuthentication.RedirectFromLoginPage(txtID.Text, True)
Else
lblInvalid.Text = "Sorry... try again..."
End If
End Sub
</script>
<html>
<head>
<title>ASP.NET Login</title>
</head>
<body>
<h2>Please Login:</h2>
<p>
Hint: Username is "user" and Password is "pass"
</p>
<p>
<asp:Label id="lblInvalid" runat="server" />
</p>
<form id="Form1" runat="server">
User ID : <asp:TextBox id="txtID" runat="server" /><br />
Password: <asp:TextBox id="txtPasswrd" TextMode="password" runat="server" /><br />
<br />
<asp:Button id="btnLogin" runat="server"
text="Login" OnClick="btnLogin_OnClick"
/>
</form>
<p>
//Here's the page we're protecting:
<a href="login-protected.aspx">login-protected.aspx</a>.
If you're not logged in, clicking the link will bounce
you right back to this page.//
</p>
</body>
</html>