我怎样才能从用户控制父页面在一个ASP.NET网站(不Web应用程序) [英] How can I get the parent page from a User Control in an ASP.NET Website (not Web Application)

查看:99
本文介绍了我怎样才能从用户控制父页面在一个ASP.NET网站(不Web应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如题目问。

编辑1

也许这是可能的某个时候,而请求正在处理存储在用户控制父页面的引用?


解决方案

  this.Page

或从任何地方:

 页页= HttpContext.Current.Handler作为页

Just as the subject asks.

EDIT 1

Maybe it's possible sometime while the request is being processed to store a reference to the parent page in the user control?

解决方案

this.Page

or from just about anywhere:

Page page = HttpContext.Current.Handler as Page

这篇关于我怎样才能从用户控制父页面在一个ASP.NET网站(不Web应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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