Validation in ASP.NET
page 8 of 9
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 36302/ 83

Validation on the client side

Nearly there

This is what you can do with validation in ASP.NET and as you can see you can do a lot. If you go to my page here, or the page using this code here, then you can experiment with creating errors and seeing what happens (there are some source changes). The changes to the source are - some control's Display is none so it only appears in the Summary. You will also notice that with the CustomValidator, the validation will occur on the server, so you get the message "Validation Passed" and then the error, to fix that, use Client-Side Java-Script, as you can see -

...... OnClientSideValidate="Validating".....

<Script language="JavaScript">
  function validating( objSen, txtVal){
    var isvalid = True;
    if(txtVal.length < 8){
        isvalid = False;)}
    return isvalid
  }
</script>

View Entire Article

User Comments

Title: Nice   
Name: Nagesh
Date: 2004-07-13 9:49:31 AM
Comment:
Thanks for such quick review ....
Title: GOOD   
Name: NAGESH
Date: 2004-07-13 8:28:00 AM
Comment:
But where is the code!!!!!!!!!!!!!!!!!

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-19 4:44:39 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search