RequiredFieldValidator problems

aurerk3yuw

New Member
When i use the RequiredFieldValidator I have something strange going on. When a textfield is not filled in the error message of the RequiredFieldValidator shows up. When I fill out the textfield without changing my cursor and submitting directly the page is not submitted but the RequiredFieldValidator message is not visible anymore.<BR>When i click submit again, it works. But it has to work directly. Is there a way this will work?<BR><BR>Here's a sample of my code:<BR>(the VB code)<BR><BR><Script runat="server"><BR> Sub Page_Load<BR> If Not IsPostBack Then<BR> Reply<BR> End If<BR> End Sub<BR> <BR> Sub Reply<BR>(and here the whole function that doesn't matter right now)<BR>End Sub<BR></SCRIPT><BR><BR><BR>(the HTML code)<BR><tr><BR> <td colspan="2"><BR> <asp:RequiredFieldValidator ControlToValidate="message" Text="U moet een bericht invoeren" Display="Dynamic" Runat="server" id="Requiredfieldvalidator2" /><BR> </td><BR> </tr><BR> <tr><BR> <td><BR> Bericht<BR> </td><BR> <td><BR> <asp:TextBox id="message" runat="server" Columns="30" Rows="3" TextMode="MultiLine" Font-Names="Arial"></asp:TextBox><BR> </td><BR> </tr><BR><BR>Sorry for my terrible english, but can anyone help me?<asp:requiredfieldvalidator id="RequiredFieldValidator1" ControlToValidate="TextBox1" ErrorMessage="This Field Is Mandatory"></asp:requiredfieldvalidator><BR><BR>This is the sentence I copy from my ASP.NET page... maybe you can verify from it.I build my control the same.<BR><BR>Do you have to click twice when the error message is on screen?
 
Back
Top