I'm using Asp.net MVC
In my layout I have a menu div
I have the container div where my @RenderBody()
is
And below I have a script that rendeniza my menu:
$(document).ready(function (e) {
$(".Menu").each(function (index, item) {
var url = $(item).data("url");
if (url && url.length > 0) {
$(item).load(url);
}
});
});
But when you click on other pages, it is always calling this script
I thought that by using @RenderBody
it just gave a "Refresh" only in the div that it is