Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 784
  • Last Modified:

difference between MAster PAges and usr controls in asp.net

Hi

What is the difference between master pages and user controls in asp.net . plelase let me know.

Thanks,
0
ram27
Asked:
ram27
3 Solutions
 
David H.H.LeeCommented:
Hi ram27,
One of the major different is Master page inherits all child pages in contentplace holder control
and usercontrol can be placed in master page. In nutshell, user control can be considered as subset of Master page control. Meanwhile, you also notice that user control can't hold any page inside.

If you're comparing both in design mode, you'll notice master page's design is rendered clearly in the entire page's design mode and user control's design only be rendered after you run the page at run-time version.
I'm sure there are more differences for both controls that used, you can check each of its original functionality and compare it respectively.

However, if you're looking for deeper explanations for both control, give these a stab:
Master Page
==============
http://www.asp.net/learn/moving-to-asp.net-2.0/module-04.aspx

User Control
===========
http://www.dotnetjunkies.com/quickstart/aspplus/doc/webpagelets.aspx
0
 
RobertNZanaCommented:
I like to think of a Master Page as a master template, while User Controls are usually web functionality "components" that you plug into a page.
0
 
Anurag ThakurCommented:
might be helpful difference between a master page and a user control
http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=32165
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now