I am new to .NET. How i can use include files for my menus? I am used to do with php is I make one php file with menu and I include it in all PHP files so that it can be changed in all pages when I would change it basic file. I dont know what is the concept of it in .NET?
Share
In ASP.NET, there is the concept of Master Pages that can be used to include commonly required files. Master pages can be nested, meaning that a Master Page can be derived from another master page, thereby allowing you to compose a page from multiple “pages/files”. Inside of a Page template, you specify the Master Page file to use, inside of the Page Directive.
If you’re just starting out in .NET web applications, may I suggest taking a look at ASP.NET MVC and the Razor View Engine, a more terse and cleaner syntax for generating HTML. Razor has a similar concept to Master Pages, but they are known as Layouts and these can also be nested.