asp.net mvc calling different usercontrol from different view -
i have view folder
frontend
 jobdetails.ascx (view)
another view folder job apply.ascx (view)
i have apply (a href) in jobdetails have show , hide div mechanism apply (rendering apply.ascx in jobdetails
 <div id="div1" style="visibility:hidden">         <% html.renderpartial("../../views/jobs/create"); %>     </div> my create view in job
    <% using (html.beginform("create", "jobs", formmethod.post, new { enctype = "multipart/form-data" }))    {%>     <%: html.validationsummary(true) %>     <table border="0" cellpadding="0" cellspacing="0">        <tr>         <td></td>       </tr>       <tr>         <td> <% } %>
the question how go in jobdetails view if error occurs in create form display errors there . @ lost here , hope question clear enough.
probably simplest way handle post of apply via ajax , render apply form errors in place replacing existing html returned when apply fails. if javascript turned off, render failed application seems reasonable trade-off me.
Comments
Post a Comment