I have some problems updating partial view on mvc4, here is the code:
<div id="partialViewDiv"></div> <input type="button" id="firstPartialLink" value="Change Div"/> <input type="button" id="secondPartialLink" value="Change Div"/> <script type="text/javascript"> $(function() { $("#firstPartialLink").click(function() { $("#partialViewDiv").load('@Url.Action("GetDiv", "Home")'); }); $("#secondPartialLink").click(function () { $("#partialViewDiv").load('@Url.Action("GetDiv2", "Home")'); }); }) </script>
When I click one of the buttons for the first time, it displays a partial view inside the DIV, but when I click it again, nothing happens, what will be the reason?
jquery c # asp.net-mvc asp.net-mvc-partialview
Victor Franchi Zeclhynscki
source share