Most likely you have src=“” on some img or link elements that re-fetch the page.
why Layout.cshtml will run lots of times?
mc
4,836
Reputation points
I am using asp.net core web application
using a _Layout.cshtml in Index.cshtml
I write some code in _Layout.cshtml and add breakpoint. I find it will hit 10 or 8 times when I open the Index.cshtml
why?