I am trying to test with a hard coded username and password and I do not know how to put them in my code. For example say I want my username to be mary and password to be pass for testing purposes.
I thought it would be : txtPassword = "pass" txtUsername = "mary"
but that doesn't work.
help please..
Here is my code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>BID</title>
</head>
<body>
<span style="font-size: 16pt; color: teal;">
<asp:Image ID="Image1" runat="server" ForeColor="Silv er" Height="128px" ImageUrl="~/IMAGES/wvdo_logo.gif"
Width="320px" /><br />
<br />
<br />
Welcome to the Project Development Department of the West Virginia Development Office.
<br />
<br />
Please enter your username and password.</span>
<form id="Form1" runat="server">
<table style="width: 504px">
<tr>
<td style="width: 111px; height: 28px">
<asp:Label ID="lblUsername " runat="server" Height="24px" Width="104px" Font-Bold="True" ForeColor="#808 0FF" >USERNAME:</asp:Label>  ;
</td>
<td style="width: 211px; height: 28px">
<asp:TextBox ID="txtUsername " runat="server" Width="136px" />
<asp:RequiredFi eldValidator ID="rfvUsername " runat="server" ErrorMessage="P lease enter your Username" ControlToValida te="txtUsername " Display="Dynami c" Width="16px">*</asp:RequiredFie ldValidator></td>
<td style="width: 211px; height: 28px">
<asp:RegularExp ressionValidato r ID="revUsername " runat="server" ControlToValida te="txtUsername "
Display="Dynami c" ErrorMessage="Y our Username is invalid"></asp:RegularExpr essionValidator ></td>
</tr>
<tr>
<td style="width: 111px">
<asp:Label ID="lblPassword " runat="server" Font-Bold="True" ForeColor="#808 0FF" Text="PASSWORD: "
Width="104px"></asp:Label></td>
<td style="width: 211px">
<asp:TextBox ID="txtPassword " runat="server" Width="136px"></asp:TextBox>
<asp:RequiredFi eldValidator ID="rfvPassword " runat="server" ControlToValida te="txtPassword "
Display="Dynami c" ErrorMessage="P lease enter your password" Width="16px">*</asp:RequiredFie ldValidator></td>
<td style="width: 211px">
<asp:RegularExp ressionValidato r ID="revPassword " runat="server" ControlToValida te="txtPassword "
Display="Dynami c" ErrorMessage="Y our password must be at least 4 characters long"
ValidationExpre ssion=" \w{4,}"></asp:RegularExpr essionValidator ></td>
</tr>
</table>
<br />
<br />
<asp:Button ID="btnSubmit" runat="server" Font-Bold="True" Text="Submit" PostBackUrl="~/projectdevelopm entmain.aspx" /><br />
&nb sp;<br />
<asp:HyperLin k ID="hprMainMenu " runat="server" Font-Bold="True" Width="88px" NavigateUrl="~/mainpage.aspx"> Main Menu</asp:HyperLink>< br />
<br />
<br />
</form>
</body></html>
THANK YOU!!!!
I thought it would be : txtPassword = "pass" txtUsername = "mary"
but that doesn't work.
help please..
Here is my code:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>BID</title>
</head>
<body>
<span style="font-size: 16pt; color: teal;">
<asp:Image ID="Image1" runat="server" ForeColor="Silv er" Height="128px" ImageUrl="~/IMAGES/wvdo_logo.gif"
Width="320px" /><br />
<br />
<br />
Welcome to the Project Development Department of the West Virginia Development Office.
<br />
<br />
Please enter your username and password.</span>
<form id="Form1" runat="server">
<table style="width: 504px">
<tr>
<td style="width: 111px; height: 28px">
<asp:Label ID="lblUsername " runat="server" Height="24px" Width="104px" Font-Bold="True" ForeColor="#808 0FF" >USERNAME:</asp:Label>  ;
</td>
<td style="width: 211px; height: 28px">
<asp:TextBox ID="txtUsername " runat="server" Width="136px" />
<asp:RequiredFi eldValidator ID="rfvUsername " runat="server" ErrorMessage="P lease enter your Username" ControlToValida te="txtUsername " Display="Dynami c" Width="16px">*</asp:RequiredFie ldValidator></td>
<td style="width: 211px; height: 28px">
<asp:RegularExp ressionValidato r ID="revUsername " runat="server" ControlToValida te="txtUsername "
Display="Dynami c" ErrorMessage="Y our Username is invalid"></asp:RegularExpr essionValidator ></td>
</tr>
<tr>
<td style="width: 111px">
<asp:Label ID="lblPassword " runat="server" Font-Bold="True" ForeColor="#808 0FF" Text="PASSWORD: "
Width="104px"></asp:Label></td>
<td style="width: 211px">
<asp:TextBox ID="txtPassword " runat="server" Width="136px"></asp:TextBox>
<asp:RequiredFi eldValidator ID="rfvPassword " runat="server" ControlToValida te="txtPassword "
Display="Dynami c" ErrorMessage="P lease enter your password" Width="16px">*</asp:RequiredFie ldValidator></td>
<td style="width: 211px">
<asp:RegularExp ressionValidato r ID="revPassword " runat="server" ControlToValida te="txtPassword "
Display="Dynami c" ErrorMessage="Y our password must be at least 4 characters long"
ValidationExpre ssion=" \w{4,}"></asp:RegularExpr essionValidator ></td>
</tr>
</table>
<br />
<br />
<asp:Button ID="btnSubmit" runat="server" Font-Bold="True" Text="Submit" PostBackUrl="~/projectdevelopm entmain.aspx" /><br />
&nb sp;<br />
<asp:HyperLin k ID="hprMainMenu " runat="server" Font-Bold="True" Width="88px" NavigateUrl="~/mainpage.aspx"> Main Menu</asp:HyperLink>< br />
<br />
<br />
</form>
</body></html>
THANK YOU!!!!
Comment