我有一个用户控件。有什么方法可以获取用户控件可用的页面吗?
最佳答案
在你的用户控件中写这个方法
protected void MyMethod()
{
Page myParent = this.Page;
...
}
关于c# - 如何让页面调用usercontrol,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3608563/
我有一个用户控件。有什么方法可以获取用户控件可用的页面吗?
最佳答案
在你的用户控件中写这个方法
protected void MyMethod()
{
Page myParent = this.Page;
...
}
关于c# - 如何让页面调用usercontrol,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3608563/