View Single Post
  #1 (permalink)  
Old January 26th, 2014, 06:33 PM
AlanWheeler AlanWheeler is offline
Authorized User
Points: 416, Level: 7
Points: 416, Level: 7 Points: 416, Level: 7 Points: 416, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Nov 2013
Posts: 84
Thanks: 29
Thanked 2 Times in 2 Posts
Default Ch 9 Input Validation - client vs. server

Hi Imar,

Since my post on Jan 24 last Friday I've made it to Ch 9 which I'm still wrapping up.

As I was playing around with the project I set a breakpoint in ContactForm.ascx.vb on the 'If' statement for the CustomValidator1_ServerValidate method that handles the server side validation. I don't remember why I did that, but the result seemed pretty neat.

Every time I tried to 'send' the email with a violation of the rules, the breakpoint was not executed. I think that nicely shows the client side validation is really occurring at the client. When the data is finally setup correctly and the 'send' is clicked, the breakpoint executes showing that the server side validation for the phone numbers goes into action. I decided to try it in and saw a similar effect with a breakpoint in the Page_Load method of the Frontend.master.vb file.

Even though I stumbled on it, it seemed like a pretty neat demo to me. Hopefully this doesn't come across as presumptuous, but I didn't know if it would be useful in whatever version of the book comes next. I just thought I should share it with you now; unless of course I'm misunderstanding what's happening here.

Best Regards, (or Cheers)

Last edited by AlanWheeler; January 26th, 2014 at 06:36 PM.. Reason: change title