Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
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
C#
System.Web.UI.Page page = System.Web.HttpContext.Current.Handler as
      System.Web.UI.Page;

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
Posted
Updated 23-Feb-12 19:49pm
v2

1 solution

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
C#
Path.GetFileName(request.PhysicalPath);


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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900