c# - Passing Model Property from pop up dialog to controller -
c# - Passing Model Property from pop up dialog to controller -
i have modal dialog in have text field want pass value controller.
pop-up dialog follows
@using (html.beginform("index", "qc", formmethod.post, new { id = "qcform" })) { ... <div id="dialog-form" title="add feedback"> <p class="validatetips">please come in feedback :</p> @html.textboxfor(m => m.rejectionreason, new { @class = "required" }) </div> ... }
submits follows
$(document).ready(function () { $('#btnrejectall').click(function(event) { event.preventdefault(); $("#dialog-form").dialog("open"); }); $("#dialog-form").dialog({ autoopen: false, height: 300, width: 420, modal: true, resizable: false, buttons: { "submit": function () { $("#qcform").submit(); }, cancel: function () { $(this).dialog("close"); } }, close: function () { $(this).dialog("close"); } }); });
if have textbox in form , not in dialog submits fine. in dialog comes in null in controller.
c# jquery asp.net-mvc
Comments
Post a Comment