Thursday, December 1, 2011

Master Pages in ASP.NET

While trying to make sense of the mess of an existing ASP.NET project, reached Master Pages. I am trying to refactor the pages which have absurd javascript to manage navigation. For what reason, I am not sure.
In any case, each page reproducing the same code didn't make much sense, and my readings took me to Master Pages.
Master Pages can be used to provide the template for common site-wide or common to sub-section of wide pages details.
I want to use it for providing the common header on top, and also to provide the navigation links. For navigation, reached the point where I have to color / highlight the current page in the navigation links. To which the solution I liked best is available here.