private void RenderViewUserControl(ViewContext context, 
			TextWriter writer, ViewUserControl control)
		{
			control.ViewData = context.ViewData;
			control.Output = writer;
			control.RenderView(context);
		}
示例#2
0
        protected override void RenderView(ViewContext context, TextWriter writer, object instance)
        {
            ViewPage        page    = (instance as ViewPage);
            ViewUserControl control = (instance as ViewUserControl);

            if (page != null)
            {
                RenderViewPage(context, writer, page);
            }
            else if (control != null)
            {
                RenderViewUserControl(context, writer, control);
            }
            else
            {
                throw Error.WrongViewBase(instance.GetType());
            }
        }
 internal ControlContainerPage(ViewUserControl control)
 {
     Controls.Add(control);
 }