hi guys,
there seems to be a strange problem with validator controls.
steps to make it behave strangely (Code given below):
1. Enter a value in the first text box.
2. Move focus to second text box.
3. Delete the text in the first text box.
4. Use the MOUSE to give focus to the second text box.
Behavior that i got:
The validator control becomes editable! plus you can delete all content along with the textbox to validate!!!!!
What kind of behavior is this? do we have any MSDN support articles for the same???
Code for the testing:
Known is handfull, Unknown is worldfull
there seems to be a strange problem with validator controls.
steps to make it behave strangely (Code given below):
1. Enter a value in the first text box.
2. Move focus to second text box.
3. Delete the text in the first text box.
4. Use the MOUSE to give focus to the second text box.
Behavior that i got:
The validator control becomes editable! plus you can delete all content along with the textbox to validate!!!!!
What kind of behavior is this? do we have any MSDN support articles for the same???
Code for the testing:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>TestValidator</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="[URL unfurl="true"]http://schemas.microsoft.com/intellisense/ie5">[/URL]
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" cellSpacing="1"
cellPadding="1" width="700" border="1">
<TR>
<TD><STRONG>Mandatory Validation</STRONG></TD>
<TD></TD>
</TR>
<TR>
<TD>Empty Label</TD>
<TD>
<asp:TextBox id="TextBox1" EmptyLabel="Enter the value!!" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="<br>RequiredFieldValidator"
ControlToValidate="TextBox1" Display="Dynamic"></asp:RequiredFieldValidator></TD>
</TR>
<TR>
<TD>Empty Label</TD>
<TD>
<asp:TextBox id="TextBox2" EmptyLabel="Enter the value!!" runat="server"></asp:TextBox>
</TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
Known is handfull, Unknown is worldfull