How do i use a master page? and display it when i run my website pls?

Recommended Answers

All 5 Replies

A brief description of masterpages:

Masterpages serve as a template to build upon when creating new pages in asp.net. An easy way to visualize it is to look at the navigation at the top of this site: there is hardware & software, software development, etc. If you were the developer of Daniweb you could have a masterpage which holds that menu, and then for each section make the individual pages.

This way you don't need to remake the same navigation bar for each and every page that uses it, therefore saving the effort of initially creating it, and especially the effort needed to update it should more sections ever be added, sections taken away, etc.

for making master pages in website ...first create master page using "add new items " in your application. Then create header, footer, left and right controls using "add new items in your application.Now add header, footer , left and right controls in Master page using just drag and drop in design mode.
Now create new webform like default.aspx, when you are creating new form visual studio asking selection of master page... set your master page and open this default.aspx page in browser.

okthx :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.