The validation question.
Is it not your assertion that you make in the book that it is more preferable to validate user input from both the client side and then validate user input on the server side as well? This way (and I could be wrong here) according what is written in your book, if a user puts in bad data on the user input form, that it will be stopped before the form can post back to the server therefore not using up server and network bandwidth and allowing the user to correct anything before it is sent back to the server. Also if the user manages to get past client side validation to put in some kind of malicious information on the web form it will then be caught at the server and stopped there. Is that correct? Is that not the optimal form of validation that should be used on ASP.Net web forms?
Also I am just a little bit concerned in regards to the intelli-sense on the Javascript part of the application. It seems to me like sometimes the intelli-sense in the VS environment can maybe just a little bit spotty and not quite as robust when working with Javascript on the client side of things as it is in the code behind files. Sometimes it works and other times it goes missing in action, whereas in the code behind it seems to work just fine.
Also on your .ascx file, I noticed that there doesn't seem to be the opening and closing <Html> or even <body> tags that you would see on your typical web form. Is that just me or is that just by design? I am just a little bit confused about that.
|