Both are code reduce features and reusability Purpose.When
we create Masterpage that is common to overall
project,whereas user controls these r used when we have
requirement on specific criteria.
Master page ex: INBOX,SPAM,DRAFT,TRASH etc in YAHOO WEBSITE
Master pages and user controils are two different concepts.
Master pages are used to provide the consistent layout and
common behaviour for multiple pages in your
applications.then u can add the Contenetplaceholder to add
child pages custom contenet.
User Controls:Sometimes u need the functionality in ur web
pages which is not possible using the Built-In Web server
controls then user can create his own controls called user
controls using asp.net builtin controls.User controlsn are
those with .aspx extensions and u can share it in the
application.
Master has a conteact plceholder where u can put child page
in this cph.
when user control is uses with in page . u can not use any
page in user control
just a not :
this can be a tricky question depending on the interviewer.
Masterpage IS a UserControl, and you can easily check this
either by exploring classes to which websites are being
compiled or simply noting :
public class MasterPage : UserControl
semanticaly, use of classical UserControl and Masterpage is
of course different, but this already has been elaborated in
other answers
user control
1)it extension is .ascx.
2)it can be more than one on single web page.
3)it doesn't contain Contentplaceholder.
4)it doesn't work like a fixed template.it can be
display in diffrent manner in diffrent page.
MasterPage:
1) it extension is .Master.
2)it used like a template.
3)it contain ContentPlaceHolder.
Master page inherits all child pages in contentplace holder
and usercontrol can be placed in master page
user control is a control which must be placed in a page to
perform specific task
I look for the answer of this question too. I have project
in ASP.NET 1.1 in this project there is just one aspx. in
this page there is placeHolder and by client's reuqest page
loads different user controls into the placeHolder. the aspx
file likes MasterPage. now i converted the project into
ASP.NET 3.0. I don't know should i change the aspx file to
master and user controls to content pages or not??
my name is sumeetha i am using google gears in .net.what's
the problem is my server is in another place. i am working
here when i entered the values in textboxes and press enter
then it should store in database(sql server) which is in
another system.when that sever system is shutdown then the
values which i submit should store in my system and after
system opened it should automatically store the values in
the system can any one plz urgent suggest answer for this
question?
What is the importence of the INTERFACE? but not the
inheritence concept?and why we r declaring the empty methods
in that? we can directly implements with in the class know?
Tell me the importence?