Master Pages真的值得努力吗? [英] Are Master Pages Really Worth The Effort ?

查看:83
本文介绍了Master Pages真的值得努力吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果想要一些脆弱或复杂的网页,我可以看到母版页很有用

设计哪一个不想改变,但那就是它停止了

$ 8
$ b 1.)一致的设计。

主页减号


1.)使得很难访问Master上的属性或函数,一个

必须要么使用FindControl,要么必须转换为适当的类型

命令获取访问权限。


2.)内容页面上的ID'变为ctl_theplaceholderName_originalID。这个

意味着在尝试将id'组合在一个普通的

类时,样式表会变得混乱。 (无论如何,这是用户控制工作的方式,但我本以为

可以检查

中未使用的ID掌握并允许它们作为原始名称保留,如果没有

重复。?!?或至少作为一个选项给出它?


IE


表格#FormName .groupingClass #ctl_theplaceholderName_originalID {}

而不是


表格#FormName .groupingClass #originalID {}

评论,我确定我已经错过了很多积极因素,但是我想讨论这个讨论。


谢谢

I can see master pages being useful if one wants some fragil or complex web
design which one does not want to have altered, but thats were it stops as
far as I can see.

Master Pages Plus

1.) Consistent Design.
Master Pages Minus

1.) Makes it difficult to access properties or function on the Master, one
has to either use FindControl or has to cast to the appropriate type in
order to gain access.

2.) ID''s on the content page become ctl_theplaceholderName_originalID. this
means that style sheets get messy when trying to group id''s in a common
class. ( this is the way user controls work anyway, but I would have thought
that It would have been possible to check the ID''s were not in use in the
master and allow them to remain as originally names in case of no
duplicates.?!? or at least give that as an option ?

IE

form#FormName .groupingClass #ctl_theplaceholderName_originalID{}

instead of

form#FormName .groupingClass #originalID {}

Comments, im sure I have missed loads of positives, but I would like
discussion on this please.

Thanks

推荐答案

你的母版页应该实现一个接口(或多个)。你的页面

应该都有一个基页。基页可以暴露一个正确的演员

大师。它都是关于面向对象的设计。在.net世界你

应该遵循界面设计也。

- 布鲁斯(sqlwork.com)


Just Me写道:
you master page should implement an interface (or multiple). you pages
should all have a base page. the base page can expose a properly cast
master. it all about object oriented design. in the .net world you
should follow the interface design also.

-- bruce (sqlwork.com)

Just Me wrote:

我可以看到母版页如果一个人想要一些脆弱的或复杂的网页,那就很有用了一个人不想改变的设计,但那就像我所看到的那样停止了。

。 />

Master Pages Plus


1.)一致的设计。


主页减去


1.)使得很难访问Master上的属性或函数,一个

必须使用FindControl或者必须转换为适当的类型

命令获取访问权限。


2.)内容页面上的ID'变为ctl_theplaceholderName_originalID。这个

意味着在尝试将id'组合在一个普通的

类时,样式表会变得混乱。 (无论如何,这是用户控制工作的方式,但我本以为

可以检查

中未使用的ID掌握并允许它们作为原始名称保留,如果没有

重复。?!?或至少作为一个选项给出它?


IE


表格#FormName .groupingClass #ctl_theplaceholderName_originalID {}

而不是


表格#FormName .groupingClass #originalID {}

评论,我确定我已经错过了很多积极因素,但是我想讨论这个讨论。


谢谢

I can see master pages being useful if one wants some fragil or complex web
design which one does not want to have altered, but thats were it stops as
far as I can see.

Master Pages Plus

1.) Consistent Design.
Master Pages Minus

1.) Makes it difficult to access properties or function on the Master, one
has to either use FindControl or has to cast to the appropriate type in
order to gain access.

2.) ID''s on the content page become ctl_theplaceholderName_originalID. this
means that style sheets get messy when trying to group id''s in a common
class. ( this is the way user controls work anyway, but I would have thought
that It would have been possible to check the ID''s were not in use in the
master and allow them to remain as originally names in case of no
duplicates.?!? or at least give that as an option ?

IE

form#FormName .groupingClass #ctl_theplaceholderName_originalID{}

instead of

form#FormName .groupingClass #originalID {}

Comments, im sure I have missed loads of positives, but I would like
discussion on this please.

Thanks


Hello Just Me" news.microsoft.com,

JI can如果一个人想要一些脆弱的话,那么看主页是有用的,或者是一个人不想改变的Jcomplex网页设计,但那就是

如果我能看到它就停止了。

J>

JMaster Pages Plus

J>

J1。)一致的设计。

J>

JMaster页面减去

J>

J1。)难以访问

JMaster上的属性或功能,必须使用FindControl或者必须转换为

适当的类型以获得访问权。


您可以使用事件驱动程序方法,使交互松散耦合


---

WBR,Michael Nemtsev [C#MVP]。

我的博客: http://spaces.live.com/laflour

团队博客: http://devkids.blogspot.com/

对我们大多数人来说,最大的危险不是我们的目标也是很高,我们

想念它,但它太低了我们达到了它 (c)米开朗基罗
Hello Just Me" news.microsoft.com,
JI can see master pages being useful if one wants some fragil or
Jcomplex web design which one does not want to have altered, but thats
Jwere it stops as far as I can see.
J>
JMaster Pages Plus
J>
J1.) Consistent Design.
J>
JMaster Pages Minus
J>
J1.) Makes it difficult to access properties or function on the
JMaster, one has to either use FindControl or has to cast to the
Jappropriate type in order to gain access.

You can use event-driver approach for this, making interactions loosely coupled

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


是的,我知道如何设置主类型并进行投射,但它仍然意味着你需要使用

在内容页面中至少有一个功能,以便

每次都避免施放。


" bruce barker" < no **** @ nospam.com写信息

新闻:%2 **************** @ TK2MSFTNGP05.phx.gbl ...
Yes, I know how to set the master type and cast it, but it still means that
you you need to have at least one function in the content page in order to
avoid casting each time.

"bruce barker" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...

你的母版页应该实现一个接口(或多个)。你的页面

应该都有一个基页。基页可以暴露一个正确的演员

大师。这一切都与面向对象设计有关。在.net世界中你应该按照界面设计进行



- 布鲁斯(sqlwork.com)


Just Me写道:
you master page should implement an interface (or multiple). you pages
should all have a base page. the base page can expose a properly cast
master. it all about object oriented design. in the .net world you should
follow the interface design also.

-- bruce (sqlwork.com)

Just Me wrote:

>如果想要一些人们不想要的脆弱或复杂的网页设计,我可以看到母版页很有用已经改变了,但那就是它我就能看到它停止了。

Master Pages Plus

1.)一致的设计。

母版页面减号

1.)难以访问Master上的属性或功能,
必须使用FindControl或必须转换为适当的类型
为了获得访问权限。

2.)内容页面上的ID'变为ctl_theplaceholderName_originalID。
这意味着样式表在尝试将id'分组时变得混乱
普通班。 (这是用户无论如何都要控制工作的方式,但是我会认为可以检查主人的ID没有使用,并允许他们保持原来的状态名称以防无重复。?!?或至少作为选项提供?

形式#FormName .groupingClass #ctl_theplaceholderName_originalID {} <

形式#FormName .groupingClass #originalID {}

评论,我确定我错过了很多积极因素,但我想<请讨论这个。

谢谢
>I can see master pages being useful if one wants some fragil or complex
web design which one does not want to have altered, but thats were it
stops as far as I can see.

Master Pages Plus

1.) Consistent Design.
Master Pages Minus

1.) Makes it difficult to access properties or function on the Master,
one has to either use FindControl or has to cast to the appropriate type
in order to gain access.

2.) ID''s on the content page become ctl_theplaceholderName_originalID.
this means that style sheets get messy when trying to group id''s in a
common class. ( this is the way user controls work anyway, but I would
have thought that It would have been possible to check the ID''s were not
in use in the master and allow them to remain as originally names in case
of no duplicates.?!? or at least give that as an option ?

IE

form#FormName .groupingClass #ctl_theplaceholderName_originalID{}

instead of

form#FormName .groupingClass #originalID {}

Comments, im sure I have missed loads of positives, but I would like
discussion on this please.

Thanks



这篇关于Master Pages真的值得努力吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆