覆盖派生页面中的母版页方法 [英] override a method of masterpage in derived page

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

问题描述

我的母版页上有一个按钮.我想按下母版页的按钮在派生页面中进行操作.

i have a button on my masterpage.i wanna that with pressing button of masterpage a action happen in derived page.

推荐答案

在您的母版页中有一个委托,并将其连接到您的派生页中.我的第一步是拥有一个派生所有页面的自定义类,该类具有一个属性,该属性是MasterPage的强类型版本,因此您可以访问添加的属性.
The way to do this, is to have a delegate in your masterpage, and hook it up in your derived page. My first step would be to have a custom class that all pages are derived from, which has a property which is a strongly typed version of the MasterPage, so you can access it''s properties that you added.




您去了:
文章:
母版页和内容页的交互 [内部母版页 [ http://forums.asp.net/t/1163677.aspx/1 [ ^ ]
http://stackoverflow.com/questions/8172506/call-master-page- function-from-user-control [ ^ ]
http://geekswithblogs.net/diadiora/archive/2008/12/01/call-a-method-from-masterpage-in-content-page.aspx [ http://www.velocityreviews.com/forums/t600932-use-master-page-functions-in-a-content-page.html [
Hi,

Here you go:
Articles:
Master Page and Content Page Interaction[^]
Inside Master Pages[^]

Similar Discussions:
http://forums.asp.net/t/1163677.aspx/1[^]
http://stackoverflow.com/questions/8172506/call-master-page-function-from-user-control[^]
http://geekswithblogs.net/diadiora/archive/2008/12/01/call-a-method-from-masterpage-in-content-page.aspx[^]
http://www.velocityreviews.com/forums/t600932-use-master-page-functions-in-a-content-page.html[^]

--Amit


这篇关于覆盖派生页面中的母版页方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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