使用 HttpContext.Current.CurrentHandler 进行运行时视图访问是否有任何潜在的陷阱?
public static GetView<T>(T view) where T : IView
{
return HttpContext.Current.CurrentHandler as T;
}
使用 HttpContext.Current.CurrentHandler 进行运行时视图访问是否有任何潜在的陷阱?
public static GetView<T>(T view) where T : IView
{
return HttpContext.Current.CurrentHandler as T;
}