Why we need to use Master Pages

Posted by Mahesh_Chs under ASP.NET on 8/2/2012 | Points: 10 | Views : 1406 | Status : [Member] | Replies : 2
hi

why we need to use masterpages, when there are usercontrols

thanks




Responses

Posted by: Oswaldlily on: 8/2/2012 [Member] Starter | Points: 25

Up
0
Down
There are some features like logo,heading of ur project,company details need to be displayed in all pages.
You dont required to write these in each pages.
Instead,use master pages and include all these.
In rest of the pages,u can inherit this masterpage alone...
Its time saving

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajkatie on: 8/2/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
User control is ideal if you are including only small section on a web pages because user control suffered from the same problem as includes files (use in asp), you have to match up the opening and closing of your html tags in two separate files.

Master page live outside of the page u develop, while user controls live withing your page and are dommed to duplication.

Rajesh Patel
.Net Trainer(M.C.S.A | MCT)
Brainbench (Asp.Net 4.5 and C# 5.0)

Mahesh_Chs, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response