Krishna

Krishna

  • NA
  • 37
  • 9.4k

Login button is not working

Mar 11 2015 6:57 AM
My html code  
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form action="UserQuery.aspx" id="form1" method="post" runat="server">
<div style="text-align: center">
<a href="http://localhost:number/Home.aspx ">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href =" http://localhost:number/Registration.aspx">Registration</a>
<br />
<img src="Images/aaa1.png" alt="logo" style="height: 180px; width: 873px" />&nbsp;<table style="width:68%; height: 225px;" align="center">
<tr>
<td rowspan="4" class="auto-style1">
&nbsp;<img src="Images/login.png" alt="login" style="height: 206px; width: 147px" /></td>
<td class="auto-style3">Login</td>
<td class="auto-style2"></td>
</tr>
<tr>
<td class="auto-style5">
<asp:Label ID="Label1" runat="server" Text="Username"></asp:Label>
</td>
<td class="auto-style6">
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox3" ErrorMessage="user name required">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style7">
<asp:Label ID="Label2" runat="server" Text="Password"></asp:Label>
</td>
<td class="auto-style8">
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="TextBox4" ErrorMessage="too short">*</asp:RangeValidator>
</td>
</tr>
<tr>
<td class="auto-style4"></td>
<td class="auto-style13">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click1" Text="Submit" Width="100px" />
</td>
</tr>
</table>
&nbsp;<br />
</div>
</form >
</body>
</html>
.aspx.cs code 
protected void Button1_Click1(object sender, EventArgs e)
{
TextBox3.Text = "********";
TextBox4.Text = "******";
Response.Redirect("http://localhost:number/UserQuery.aspx");
}
 
while clicking on the submit button on the web page its not getting navigate to the other page 
thanks in advance  

Answers (8)