What is the difference between User Controls and Master Pages
Answer Posted / e l v prasad
Master Page:
1. It is a template and however it has all the events as
applicable to the web page.
2. It can be designed in one language and can be used for
the web pages of all the .NET supported languages.
3. Master Page can be assigned in web.config file so that
the web pages in the project will automatically use Master
page.
4. Master Page can be used for web page within a specific
folder by declaring a web.config file for that.
5. Master Page contents in the Content Page will be
displayed while working with the application.
6. Master Page contents which not editable in the Content
Page will be displayed in the gray color.
7. Duplication of templates is not possible with the master
pages.
User Control:
1.It is designed from the existing controls in the .NET. It
has to be registered witha @Regisgiter page directive.
2.Designing of User control in one language and can't be
used in web pages of all the .NET compliant languages.
3. It must be registered in each and every web page, where
it has to be used.
4. There is no scope to use the User Control to a web pages
within a specific folder or project like Master Page
5. User Control contents will not be displayed during
design time.
6. All the User control contents will appear in web pages
as gray color and there is no scope to change editable
template contents as in Master Pages.
7. There is a possibility of duplication in web pages with
the User Controls
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain the asp.net mvc folder conventions? : asp.net mvc
What are the security types in asp.net?
What is globalization and localization in asp net?
8. Why do you want to work here?
What is the current version of asp.net?
What are different types of api?
What is a 307 redirect?
if i wanna deploy my asp.net project to the production server and situation is that i m still not compiled my project i have as-is on my development side now on production server we dont have a visual studio now what kind of settings i need to be to do in webconfig /machine.config file to deploy my project and in iis too....
where can i gather the materials for MCP certification
What is anonymous authentication?
Explain diff. Between friend and protected friend?
What is the asp.net mvc folder conventions? : asp.net mvc
What is Partial PostBack in ASP.NET?
What is data grid view in asp.net?
What are type/key pairs in client script registration? Can there be 2 scripts with the same type/key pair name?