modal popup example mvc
I want to have a modal popup that may also have validation upon post. Can I have开发者_开发问答 an example please.
For the validation piece, a great example is provided by good ole Scott Gu. I would suggest using client-side validation (requires MVC 2) rather than validating on post. Follow Scott Gu's post precisely, and optionally swap out the microsoft .js files for jquery.validate.min.js and MicrosoftMvcJqueryValidation.js (only do this if you're like me and prefer using all jquery instead of mish-mash MS javascript).
For the modal dialog, I like jqModal but there are several plugins out there to choose from.
Have you considered twitter bootstrap http://twitter.github.com/bootstrap/ There's a whole section on modal http://twitter.github.com/bootstrap/javascript.html#modals The validation itself can done via jQuery.
精彩评论