Fahad Azeez

Fahad Azeez

  • NA
  • 4
  • 5.7k

How to prevent reloading _Layout.cshtml in asp.net cor mvc

Oct 6 2019 5:53 AM
Hi
 
I have a side bar as shown below
 
This is the orginal state.
 
Pic-1
 
Pic-2
after expanding
 
 
The problem is, whenever i click on the links in the side bar (its a list) the whole page gets reloaded. That means the list goes to the orginal state as in pic-1.  I know this is because of @renderbody() method. But I cannot use @RenderPartial beacuase i have muliple view pages to pass on.
 
Is there any way to load only the @RenderBody() area without changing list state.

Answers (1)