jQuery: How to handle submit callback with upload control in dialog?
<p>In a modal jQuery dialog I have form with inputs among them I have upload control.
Due above thing form is marked by enctype = "multipart/form-data". Form action refers to
controller action that will return partial view that should be placed on a page on callback handling.</p>

<p>To handle submit callback was trying by following (using plugin and simply posting):</p>

<pre><code>            var event = jQuery.Event("submit");
            e.preventDefault();
            $("form:first").trigger(event);
            $(this).ajaxSubmit(options);

            OR SUCH:

            $.ajax({
                url: '/Controller/Action',
                type: 'POST',
                success: function (data) {
                    $("#divContainer").html(data);
                }
            });
</code></pre>

<p>But these ways are not successfull. No it works like following, without callback handling.                 </p>

<pre><code>            var event = jQuery.Event("submit");
            $("form:first").trigger(event);
</code></pre>

<p>So, how submit callback can be handled?</p>

<p>Thanks.</p>

<p><strong>MY IS SOLUTION</strong></p>

<pre><code>            var options = {
                target: '#targetDiv'
            };
            $('#form').ajaxSubmit(options);
</code></pre>
