Where can I define a constructor parameter for a page class
-
18-10-2022 - |
문제
public partial class DataPage : System.Web.UI.Page
{
IPersonPresenter presenter = null;
public DataPage(IPersonPresenter presenter)
{
if (presenter == null) throw new Exception("Didn't receiver the presenter");
this.presenter = presenter;
}
}
I need to pass presenter as a Dependency Injection paramter for this ASP.Net web forms class. I tried Global.asax but couldn't find a factory or anything similar. Please help. Thanks.
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow