asp.net webforms プロジェクトで Basepage クラスを宣言して、IBasePage も実装するにはどうすればよいですか?
public abstract class BasePage<T> : Page where T : class
{
}
とインターフェース
public interface IBasePage
{
UserProfile UserProfile { get;}
bool IsStreamingAdmin {get;}
int? EmplId {get;}
}
私の最終的な目標は、次のようなコードを記述できるようにすることです。
IBasePage page = HttpContext.Current.Handler as IBasePage;
if (page.IsStreamingAdmin)
{
//do something here....
}