views:

84

answers:

1

Hi all,

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.

+1  A: 

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

Darin Dimitrov
Thanks for the suggestion, using regular Html.BeginForm with jQuery.form solved the problem! Pretty cool stuffs, I was having problem with getting a json response from my ActionResult so I went with just a comma delimited string.
Xuan Vu