开发者

ASP.NET MVC normal edit form with upload (and validation) using jQuery UI Modal

开发者 https://www.devze.com 2023-01-01 22:26 出处:网络
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 doe

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消