I am trying to develop logic to add dynamic controls to page via class method. So I want to know how can we access the ASP.Net Page object reference in class method
1. Pass the page object as Parameter
2. If using class library make sure you add reference of System.Web namespace and then use following code
Page page = HttpContext.Current.Handler as Page;
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.