how to use submit button with ajax in asp.net -
in asp mvc project want add company database without refreshing page. how can ajax. want submit data , return same page without refresh. part of code
@using (html.beginform("create", "company", formmethod.post, new { enctype = "multipart/form-data" })) { @html.validationsummary(true) <fieldset> <div class="editor-label"> @html.labelfor(model => model.nom_company) </div> <div class="editor-field"> @html.editorfor(model => model.nom_company) @html.validationmessagefor(model => model.nom_company) </div> <div class="editor-label"> @html.labelfor(model => model.desc_company) </div> <div class="editor-field"> @html.editorfor(model => model.desc_company) @html.validationmessagefor(model => model.desc_company) </div> <div class="editor-label"> @html.labelfor(model => model.datedebut_company) </div> <div class="editor-field"> @html.editorfor(model => model.datedebut_company) @html.validationmessagefor(model => model.datedebut_company) </div> <div class="editor-label"> @html.labelfor(model => model.datefin_company) </div> <div class="editor-field"> @html.editorfor(model => model.datefin_company) @html.validationmessagefor(model => model.datefin_company) </div> <p> <input type="file" name="file" /> <input type="submit" value="create" /> </p> </fieldset> }
any please
Comments
Post a Comment