Home  >  Q&A  >  body text

How to undo JQuery selector html() redirect?

<p>How do I unit redirect the HTML settings to my section after I'm done with it?<br /><br />I use an ajax call to retrieve the data for the section view. JQuery html() helps redirect the response locally. However, in this solution, there is a refresh happening, which triggers OnGet and refreshes the entire page. In this case, full page refreshes are now directed to the partial view index of the index. cshtml page. </p><p><br /></p> <pre class="brush:php;toolbar:false;">$.post('/reports/AddReportData', formData ) .done(function (response) { $("#myPartialView").html(response); });</pre> <p><br /></p>
P粉864594965P粉864594965444 days ago358

reply all(1)I'll reply

  • P粉546257913

    P粉5462579132023-08-02 00:47:03

    In my case there was a routing issue causing the second post to OnPost(). Solving the routing problem is the solution.

    reply
    0
  • Cancelreply