Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Apr 13, 2012 01:27 AM|LINK
This is my first time working on a MVC project. Please bear with me.
I have this user registration form. We have five different user types. I have a main View page and five different partial views. I display the right partial view depending on what user type was selected.
When the form is submitted, I have to do some server side validation.
public ActionResult UserRegistration(FormCollection form)
//Perform some validation
//If validation fails
ModelState.AddModelError("", "some error message");
I want to re-display the User Registration form, with the right partial view that the user was on (UserType is part of form collection). And I want to display the ModelState error message. How do I do that?