English 中文(简体)
这对主页或继承页有什么好处?
原标题:What s preferred for this - master page or page inheritance?
  • 时间:2009-12-02 07:57:29
  •  标签:
  • asp.net

我需要建立一个网页,在我的系统中编辑一个实体,并建立一个网页,以观察一个实体。 不同页数是菜单和其他几个控制。

我目前有两种选择:

  1. Create a master page with a few content placeholders and fill them up in the edit and view pages.
  2. Create a base page for them and inherit from it.

你们建议哪种选择?

问题回答

主页让你们继承法典和标志。

基础网页(从原页继承的基级)只允许你继承代码;任何相关的标记都必须注入,这是避免的一件好事。 从建筑角度讲,即使你能够发挥作用,用一个标记的页做某些部分的同级工作,从来都不是一种稳妥的做法。

由于你的网页似乎共用标记,这意味着一个总页将是更好的答案。

BTW不忘记,你能够打上主页,因此,如果你需要几个网站,你就可以把这些网页放上。 如果需要,也可从儿童网页上查阅主页的方法和财产。

由于接口存在差异,而不仅仅是行为,我建议使用总页。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签