In TicketExtractionWeb, create the BasePage class.
BasePage.cs:
public class BasePage : System.Web.UI.Page {
And the page (we will call it MyPage):
public class MyPage : BasePage { protected Page_Load(object sender, EventArgs e) { var currentDate = this.GetCurrentDate(); } }
Therefore, when you create another aspx page, it will be by default:
public class MyNewPage : System.Web.UI.Page {
Just change : System.Web.UI.Page to : BasePage
source share