client & server validation

Results 1 to 2 of 2

Thread: client & server validation

  1. #1
    Join Date
    Dec 1969

    Default client & server validation

    Hi,<BR><BR>How would I duplicate/add the "onsubmit" functionality to an ASP.Net form to offer client-side validation?<BR><BR>&#060;script language="javascript"&#062;<BR>&#060;!--<BR>function processForm()<BR>{<BR>/* Perform additional validation on ALL form controls.<BR>All controls must return true to pass validation. */<BR>}<BR>//--&#062;<BR>&#060;/script&#062;<BR><BR>&#060;form id="myForm" method="post" onsubmit="return processForm();" runat="server"&#062;<BR>&#039;Web Controls<BR>&#060;/form&#062;<BR><BR>I&#039;d still like to be able to use .NET validation as well. I know there is a CustomValidator control, but could this work to test validation for all web controls that belong to the form? Is there a better approach?<BR><BR>Thanks,<BR>D.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: client & server validation

    Use the CustomValidator. It&#039;s really the way to go. Check the help files.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts