从普通页面访问母版页 [英] access master page from a normal page

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

问题描述

我想从不是母版页子级的普通页面访问母版页

I want to access master page from a normal page that is not a child of master page

please tell how to achive this.

推荐答案

尝试访问您的页面不是子页面的母版页面没有任何意义.
您实际上可以从中使用什么?
There is no point in trying to access a master page of which your page is not a child.
What could you actually use from it?


实际上我的母版页包含一个菜单(div)
我正在从内容页面调用dhtml模态弹出窗口.
我试图通过内容页面隐藏母版页上的菜单,它也隐藏了
但是随着模式窗口的弹出,菜单再次变得可见
Actually my masterpage contains a menu(div)
and i am calling a dhtml modal popup from a content page.
i tried to hide the menu on master page by content page it hides too
but as the modalwindow popups the menu become visible again


否.如果您的页面不是派生同一个母版页文件,则无法访问母版页控件.

如果您正在使用母版页,请尝试此操作.
No. You can not access the Master page control if your page is not derived the same Master page file.

If you are page using Master page then, try this.
Master.FindControl("ctrl")


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

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