<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<script language="VB" runat="server">
Private Sub Page_Load(sender As Object, e As EventArgs)
If Request.RequestType = "POST" Then
Dim userid As String = Request.Form("txtUserid")
Dim password As String = Request.Form("txtpwd")
If userid = "matrix" And password = "12345" Then
Response.Redirect("welcome.aspx")
Else
lblStatus.Text = "Invalid userid or password!"
End If
End If
End Sub
</script>
<form id="f1" method="post" runat="server">
<fieldset style="width:280px; background-color:aqua">
<legend>Login</legend>
<table>
<tr>
<td>User ID:<font color="#cc0000">*</font></td>
<td><asp:TextBox ID="txtUserid" runat="server"></asp:TextBox><br /> </td>
</tr>
<tr>
<td>Password:<font color="#cc0000">*</font></td>
<td><asp:TextBox ID="txtPwd" runat="server" TextMode="Password"></asp:TextBox><br /></td>
</tr>
<tr>
<td> </td>
<td><asp:Button ID="btnLogin" runat="server" Text="Login" /></td>
</tr>
<tr>
<td> </td>
<td><asp:Label ID="lblStatus" runat="server" Text=""></asp:Label></td>
</tr>
</table>
</fieldset>
</form>
</body>
</html>