软讯网络 > 网站建设 > PHP > 自定义控件 调用 父页的方法
【标 题】:自定义控件 调用 父页的方法
【关键字】:
【来 源】:http://blog.csdn.net/keyler/archive/2007/01/22/1489728.aspx
自定义控件 调用 父页的方法
在asp.net 中调用父页的方法。
// default.aspx 页面
public void reflash()
{
//customer code
}
// custom.ascx 自定义控件
protected void reflashParent()
{
//_default 是 default 的类名,Page是当前页面
_default pg = Page as _default
if(pg != null)
{
//调用父方法
pg.reflash();
}
}
【相关文章】
没有相关文章