예제 #1
0
 public Controller()
 {
     this.Context = System.Runtime.Remoting.Messaging.CallContext.HostContext as System.Web.HttpContext;
     if (Context == null)
     {
         throw new ArgumentException("无法获取web请求上下文信息");
     }
     this.ViewData = new HttpContextItemWrapper(this.Context);
 }
예제 #2
0
 protected override void OnInit(EventArgs e)
 {
     this.ViewData = new HttpContextItemWrapper(this.Context);
 }