查找包含用户控件的页面的名称 [英] Finding the name of the page holding the User Control

查看:74
本文介绍了查找包含用户控件的页面的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 如何在ascx.cs页面中找到包含用户控件的页面的名称和用户控件的ID


感谢advanc

Hi How can I Find the name of the page holding the User Control , and id of the user control in ascx.cs page


Thanks in advanc

推荐答案

尝试this.Page

但正如SAKryukov问为什么?!用户控件不应知道应在何处使用.您可能需要重新考虑您的设计.
Try this.Page

But as SAKryukov asked why?! A user control is not supposed to know where it shall be used. You may need to reconsider your design.


这篇关于查找包含用户控件的页面的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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