r/ASPNET • u/davegri • May 21 '13
Beginner to Asp.net, need help with server-side validation
I pasted all my code on this stack overflow question:
http://stackoverflow.com/questions/16664483/validating-server-side-with-asp-net-and-c-sharp
This is basically my question:
I think i'm doing everything right so far (I'm a beginner in anything beyond html/css) but correct me if I've made any errors.
What I want to do now is validate my form input server-side before I insert it into my database. I want to check that it obeys all my rules, char-lengths, matching fields and so forth - and also that the username/email isn't taken already.
I'm currently doing some basic javascript validation but I understand that isn't sufficient security wise.
an explanation (as simple as possible) as to what I have to go about doing now, would be great. Ideally i would like to return to the signup page and list the errors at the top of the form in a customizable way.
thanks
View all comments
Show parent comment
1
u/snkscore May 22 '13
For our webapps, which are often very form centric, webforms drastically outperforms MVC in terms of productivity. The type of stuff we do in a matter of hours with a host of controls would take days or weeks with MVC.
Webforms has strongly typed model binding
Never been an issue and I've been doing asp.net for 12 years. I don't really care if the HTML is ugly or even if it's bloated. Productivity is more important.
WebForms with the MVP pattern is significantly more testable than MVC. No one wants to talk about it because everyone is on the Look-I-can-unit-test-MVC bandwagon and no one wants to be shown that the emperor has no clothes when MVP pattern and WebForms covers far more application logic in unit tests.
WebForms has had that for 12 years.