sorry, i didn't test the code before i posted it, and i didn't give the
right instructions to break the page:
<%@ Page Language="c#" %>
<html>
<head>
<title>Login</title>
<style type="text/css">
<!--
.texterror {
font-weight: bold;
color: #FF0000;
}
-->
</style>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td align="center"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form id="frmLogin" runat="server">
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="right">Employee ID:</td>
<td><asp:TextBox ID="tbEmpId" runat="server" MaxLength="3" />
<asp:regularexpressionValidator ID="revEmpId" runat="server"
ControlToValidate="tbEmpId" ErrorMessage="Invalid Employee ID."
ValidationExpression="[\d][\d][\d]" Display="Dynamic" /></td>
<td><asp:RequiredFieldValidator ID="rfvEmpId" runat="server"
ControlToValidate="tbEmpId" CssClass="texterror" Display="Dynamic"
ErrorMessage="Employee ID is required." /></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><asp:TextBox ID="tbPassword" runat="server" TextMode="Password"
/></td>
<td><asp:RequiredFieldValidator ID="rfvPassword" runat="server"
ControlToValidate="tbPassword" CssClass="texterror" Display="Dynamic"
ErrorMessage="Password is required." /></td>
</tr>
<tr>
<td align="center" colspan="2"><asp:Button ID="btnLogin"
runat="server" Text="btnLogin" /></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
to break the page. type a password then click the login button.
this displays the dynamic rfvEmpId. then type an id and click in the
password field. watch the cursor jump near the semi-colon and you can
type on the page
thanks for any help you can provide
message Abraham,
Two things:
1) It didn't break for me. This makes me suspect that it has to do with
your style sheet. Since you didn't include that I can't see what you're
setting in the CssClass setting texterror. I suspect that is where the
problem is.
2) As a side note I noticed that you put a table around your form tags.
You really should put all code you are adding to the page inside of the
form tags.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
try this code and watch it break
<%@ Page Language="c#" %>
<html>
<head>
<title>Login</title>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
<td align="center"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><form id="frmLogin" runat="server">
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td align="right">Employee ID:</td>
<td><asp:TextBox ID="tbEmpId" runat="server" MaxLength="3" /></td>
<td><asp:RequiredFieldValidator ID="rfvEmpId" runat="server"
ControlToValidate="tbEmpId" CssClass="texterror" Display="Dynamic"
ErrorMessage="Employee ID is required." /></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><asp:TextBox ID="tbPassword" runat="server" TextMode="Password"
/></td>
<td><asp:RequiredFieldValidator ID="rfvPassword" runat="server"
ControlToValidate="tbPassword" CssClass="texterror" Display="Dynamic"
ErrorMessage="Password is required." /></td>
</tr>
</table>
</form></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
to make it break, just type something in employee id then click on the
password text box. the cursor jumps near the semi colon and you can
type on the page
in message Abraham,
What do you mean by it breaks explorer? If you could give a more
detailed explanation of what you're doing and what error is occurring
it would be much easier to help.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
how do i stop the dynamic validators from breaking explorer
if i use a dynamic validator and move to a different control it
breaks explorer and i can type in the page when i'm not supposed to.
thank you.