Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 02, 2012 01:31 PM by seiko88
Apr 30, 2012 03:32 PM|LINK
Unfortunately i have to set enableclientscript="False" because of Ajax problem. So now, how may i handle the validation? The validation wont work anymore...
<asp:ValidationSummary ID="ValidationSummary1" HeaderText="Please correct the following:" ShowMessageBox="true" ShowSummary="false" runat="server" EnableClientScript="False"/>
<asp:TextBox ID="txtNewLocationName" runat="server" MaxLength="50" />
<asp:RequiredFieldValidator runat="server" ID="rfvNewLocationName" Display="None"
ControlToValidate="txtNewLocationName" ErrorMessage="Location Name is required." />
Apr 30, 2012 05:38 PM|LINK
you will be submitting the entered text values in some button event
check if the textbox value is greater than 0 in that event
else throw error message
Location is required
May 01, 2012 05:14 AM|LINK
The EnableClientScript property is for a client side validation. The control itself uses server side validation so it sounds like it is working how it should. If you have a textbox that is optional then I would remove that RequiredFieldValidator. No point
in mandating a field is to be filled out if it is optional.
Validation controls always perform validation on the server. They also have complete client-side implementation that allows DHTML-supported browsers (such as Microsoft Internet Explorer 4.0 and later) to perform validation on the client. Client-side validation
enhances the validation process by checking user input before it is sent to the server. This allows errors to be detected on the client before the form is submitted, avoiding the round trip of information necessary for server-side validation.
May 02, 2012 01:31 PM|LINK
I could not figure out how to show my messages in message box but it worked to write the error messages near wrong content.