全局asax-从全局asax获取对请求页面的控制 [英] Global asax - get control of requested page from global asax

查看:81
本文介绍了全局asax-从全局asax获取对请求页面的控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的站点中,当我单击所选页面的按钮时,我需要将按钮文本与相应的页面名称一起保存.每次单击按钮时,都会触发Global.asax的"Application_PostAcquireRequestState".

代码

Hi,

In my site, when i click on an button of selected page, i need to save the button text with corresponding page name. Each time a button is clicked, ''Application_PostAcquireRequestState'' of Global.asax fires.

The code

System.Web.UI.Page page = System.Web.HttpContext.Current.Handler as
      System.Web.UI.Page;


用于从全局asax的''Application_PostAcquireRequestState''事件获取请求的页面名称.
我如何获得刚从global.asax单击的按钮文本?

请帮忙..

在此先感谢


is used to get the requested page name from ''Application_PostAcquireRequestState'' event of Global asax.
How can i get the button text just clicked from global.asax?

Please help..

Thanks in advance

推荐答案

为什么不创建按钮单击事件.并使用EventArgs来获取按钮名称.然后使用Request.Url来获取页面名称.或
Why don''t you create a button click event. and use the EventArgs to get the button name. And the use Request.Url to get the page name. Or
Path.GetFileName(request.PhysicalPath);



如果有帮助,请投票并接受答案作为解决方案.



Please vote and accept answer as solution if it helps you thanks.


这篇关于全局asax-从全局asax获取对请求页面的控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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