母版页图案设计 [英] Master page pattern design

查看:77
本文介绍了母版页图案设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
我正在使用asp.net 3.5,需要了解如何动态管理母版页的结构.我对此不了解更多.我正在通过使用面向模式的设计进行搜索和阅读,但是我不清除其概念,因此请告诉我我们将如何使用它以及它有什么需要.


在此先感谢.

hi
I am using asp.net 3.5 and need to understand how i will mannage structure of master page dynamically.I dont know more about it.I am searching and reading by using pattern oriented design we will do this but i dont clear its concept so please told me how we will use it and what is the need of it please.


Thanks in Advance.

推荐答案

通过动态管理母版页结构"来澄清您的意思.母版页的目的是使网站具有共同的外观.如果它根据某些标准进行更改,那么就没有通用性,您不应该使用母版页.使用母版页的内容页可以并且确实会发生变化.
Clarify what you mean by "managing structure of master page dynamically". The purpose of a master page is to give a common look & feel to a site. If it changes based on some criteria then there is no commonality and you should not use master pages. The content page, which makes use of the master page, can and does change.


作为Mark答案的补充,您可以使用内容占位符控件.您可能应该查看教程,以了解使用此过程进行此操作的基本概念.
As an addition to Mark''s answer, you "customize" the parts that allow for it using the content placeholder controls. You should probably look into this tutorial to understand the fundamental concept behind this using this process.


如果要使用page_preinit事件对母版页进行动态更改.除了无法在运行时对母版页进行动态更改之外,请在preinit事件中尝试进行此更改.
if you want to do changes to master page dynamically using page_preinit event.Except that you can''t do dynamic changes to master page at runtime.so try it in preinit event.


这篇关于母版页图案设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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