how to write javascript validations for database updation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saga git
    New Member
    • Oct 2009
    • 5

    how to write javascript validations for database updation

    how to write javascript validations for database updation
  • semomaniz
    Recognized Expert New Member
    • Oct 2007
    • 210

    #2
    you got to provide us with more details. What kind of validation are you referring too? Provide us with your code for further help.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Database interaction occurs Server Side.
      JavaScript is executed Client Side.

      You cannot write JavaScript validations that are execute when a database is being updated.

      You can, however, validate that the data the user provided in the web page before the data is sent to the server using JavaScript.

      Since it is easy to get around client-side validation, you should also validate the data Before you update the database with the data the user provided.

      So, you need to do validation in 2 places: client-side (with JavaScript) and server-side.

      You can use pre-baked ASP.NET controls like the RequiredFieldVa lidator control, or the CustomValidator control, or any other Validator control...


      Please take a look at: Validating in ASP.NET

      -Frinny

      Comment

      Working...