开发者

Difference between Masterpage vs Usercontrol vs Customcontrol

please help m开发者_高级运维e to understand the difference between Master page vs Usercontrol vs Custom control


Check the answer to a similar question here:

ASP.Net Custom controls vs. user controls: Are these two the same

Master pages are actually user controls; you can verify this by going to the code-behind of your master page class, right-click on the class name and select "Go To Definition". You will see something like this:

public class MasterPage : UserControl
{
    ...
}

User controls are convenient for display components that are repeated withing a single project, such as menus and panels. The problem is that they do not generate .DLLs and have to be hand-copied to other projects, if needed.

Custom controls on the other hand can be created in separate class libraries and reused as desired across other projects. With custom controls, display artifacts have to be created entirely in code and they take slightly longer to develop.

Check out a comparison between user controls and custom controls from Microsoft:

http://support.microsoft.com/kb/893667

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜