The following line gives me the current page in c# web application asp.net using c#. However I want to set a specific page from my web application like Webform2.aspx every time I use function.
Page page = HttpContext.Current.CurrentHandler as Page;
I haven't found anything related to this on the internet. Is it even possible?
EDIT: FOR EXPLANATION
See the above line code gives me the current webform in the page object. Right? There is another webform let us say WEBFORM2 in my application. I want to get that Webform2 in this page object. How can I get that ?