本文介绍了您更喜欢母版页还是用户控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我知道有时候使用Master会在页面深处引用控件 Page可能很时髦。 对于使用标准页眉的网站/页脚/导航,您更喜欢使用用户 常用项目的控件,还是您更喜欢母版页? 您最好的经验是什么?我已经下载了一些示例项目 (就像Telerik Rad Controls一样)并注意到他们喜欢使用 用户控件。 每个的利弊是什么? 谢谢。 解决方案 " Cirene" < ci **** @ nowhere.com写了留言 新闻:ew ************** @ TK2MSFTNGP03.phx.gbl ... 除了Eliyahu的回复,MasterPages实际上是UserControls 无论如何......经常有误解(不是针对的)你认为MasterPages 是某种方式的框架集的ASP.NET实现 - 没有什么可以比实际更进一步的实际... Eliyahu也是正确的,因为MasterPages确实引入了一定程度的b $ b b复杂性,但它并不完全是火箭科学...... :-) IMO,MasterPages是ASP.NET 2中的主要创新之一,而我个人b $ b个人从不使用其他任何东西进行常见布局。 - Mark Rae ASP.NET MVP http: //www.markrae.net 除了Eliyahu的回复,MasterPages实际上是UserControls 无论如何...通常存在误解(不针对你认为MasterPages 是某种方式的框架集的ASP.NET实现 - 没有什么可以比实际更进一步的实际... Eliyahu也是正确的,因为MasterPages确实引入了一定程度的b $ b b复杂性,但它并不完全是火箭科学...... :-) IMO,MasterPages是ASP.NET 2中的主要创新之一,而且我个人从不使用任何其他东西进行常见布局。 IMHO 主页不是真正的用户控制。使用 用户控件进行调试真的很难,但主页面。 I know that sometimes referring to controls deep in a page using a MasterPage can be funky. For a website using a standard header/footer/nav, do you prefer using UserControls for the common items, or do you prefer Master Pages? What is best from your experience? I''ve downloaded a few sample projects(like for the Telerik Rad Controls) and have noticed that they like to useUser Controls. What are the pros/cons of each? Thanks. 解决方案 In addition to Eliyahu''s response, MasterPages are actually UserControlsanyway... There is often a misconception (not aimed at you) that MasterPagesare somehow the ASP.NET implementation of framesets - nothing could befurther from the truth... Eliyahu is also correct in that MasterPages do introduce a certain level ofcomplexity, but it''s not exactly rocket science... :-) IMO, MasterPages were one of the major innovations in ASP.NET 2, and Ipersonally never use anything else for common layout.--Mark RaeASP.NET MVP http://www.markrae.net In addition to Eliyahu''s response, MasterPages are actually UserControlsanyway... There is often a misconception (not aimed at you) that MasterPagesare somehow the ASP.NET implementation of framesets - nothing could befurther from the truth...Eliyahu is also correct in that MasterPages do introduce a certain level ofcomplexity, but it''s not exactly rocket science... :-)IMO, MasterPages were one of the major innovations in ASP.NET 2, and Ipersonally never use anything else for common layout. IMHO Master pages are not really user control. It''s really hard to debug onuser control but master page. 这篇关于您更喜欢母版页还是用户控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-21 13:56