ASP.NET MVC normal edit form with upload (and validation) using jQuery UI Modal
I have a form that resides inside a jQuery UI dialog, the form have some fields 开发者_开发问答such as first, last name, etc... and also allow file upload. I can't use Ajax.BeginForm() since ajax doesn't allow upload (or does it?), so I have to use the regular Html.BeginForm() for my form to call my ActionResult. But I need to do some validation on the server and displays the response within that form, or displays a message if the form successfully posted. How do I displays the message in that jQuery UI modal dialog?
Thanks all.
Instead of using Ajax.BeginForm
which is tied to the crappy Microsoft Ajax library use a normal Html.BeginForm
with jQuery and the excellent jQuery.form plugin which allows you to ajaxify forms (even forms that contain file upload fields).
精彩评论