asp.net mvc - submit Ajax form in MVC3 -
i have form has fields .i want show labels when user enter number in textbox in 1 of form fields. know have use ajax problem ajax form in form. when submit ajax form outter form submit , can not ajax request. here code structure:
@using (html.beginform()) { @html.validationsummary(true) <fieldset style="font-family:'b nazanin';font-size:14pt"> <div align="center"> <table border="0"> <tr align="center"> <td> @html.labelfor(model => model.a) </td> <td> @html.labelfor(model => model.a) @html.editorfor(model => model.a) @html.validationmessagefor(model => model.a) </td> </tr> </table> <div align="right" id="searchjustform"> <fieldset style="font-family:'b nazanin';font-size:14pt"> @using (ajax.beginform("index", "terminal", new ajaxoptions() { updatetargetid = "divgomrokjust", insertionmode = insertionmode.replace })) { <div align="center"> thank you attention.
you cannot nest html forms. that's invalid html. have modify markup. use pure jquery subscribing .change events of form elements , trigger ajax request using $.ajax method.
Comments
Post a Comment