Exemple #1
0
 private void RenderViewPage(ViewContext context, ViewPageBase page)
 {
     if (!string.IsNullOrEmpty(this.MasterPath))
     {
         page.MasterPageFile = this.MasterPath;
     }
     page.ViewContext = context;
     page.RenderView(context);
 }
Exemple #2
0
        protected override void RenderView(ViewContext viewContext, TextWriter writer, object instance)
        {
            ViewPageBase viewPage = instance as ViewPageBase;

            if (viewPage != null)
            {
                this.RenderViewPage(viewContext, viewPage);
            }
            else
            {
                throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "视图:{0}必须派生于ViewPageBase, ViewPageBase<TModel>", new object[]
                {
                    base.ViewPath
                }));
            }
        }
Exemple #3
0
 /// <summary>
 /// 处理请求
 /// </summary>
 /// <param name="context"></param>
 public override void ProcessRequest(HttpContext context)
 {
     this.ID = ViewPageBase.NextId();
     base.ProcessRequest(context);
 }
Exemple #4
0
 public override void ProcessRequest(HttpContext context)
 {
     this._userControl.ID = ViewPageBase.NextId();
     this.Controls.Add(this._userControl);
     base.ProcessRequest(context);
 }