• ASP.NET Render 概要


    在ASP.NET的生命周期走到Render阶段,Page.ProcessMain方法会调用Page的RenderControl方法,RenderControl方法会调用RenderControlInternal,RenderControlInternal根据该空间否是有ControlAdapter调用不同的呈现方法。RenderControlInternal的方法原型如下:

        private void RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
        {
          
    if (adapter != null)
          {
            adapter.BeginRender(writer);
            adapter.Render(writer);
            adapter.EndRender(writer);
          }
          
    else
          {
            
    this.Render(writer);
          }
        }

    默认情况下会执行到Page类的Render方法。

     剩下的过程如下:

    Page.Render--->Control.Render--->Control.RenderChildren--->Control.RenderChildrenInternal --->control.RenderControl--->Control.RenderControlInternal.

    RenderChildrenInternal的方法原型如下: 

         internal void RenderChildrenInternal(HtmlTextWriter writer, ICollection children)

        {
          
    if ((this.RareFields != null&& (this.RareFields.RenderMethod != null))
          {
            writer.BeginRender();
            
    this.RareFields.RenderMethod(writer, this);
            writer.EndRender();
          }
          
    else if (children != null)
          {
            
    foreach (Control control in children)
            {
              control.RenderControl(writer);
            }
          }
        }

    Remark:

    In the method of  RenderChildrenInternal,the argument children with type IConllection will be circulated,to invoke t every control's RenderControl Method.

  • 相关阅读:
    [LeetCode]98. SortColors颜色排序
    [LeetCode]97. Reorder List链表重排序
    [LeetCode]96. Min Stack带Min函数的栈
    [LeetCode]95. Implement Stack using Queues用队列实现栈
    opencv的学习笔记4
    opencv的学习笔记3
    RCNN 和SPPnet的对比
    CNN & RNN 及一些常识知识(不断扩充中)
    RCNN--对象检测的又一伟大跨越 2(包括SPPnet、Fast RCNN)(持续更新)
    【转】有监督训练 & 无监督训练
  • 原文地址:https://www.cnblogs.com/cnbwang/p/2051633.html
Copyright © 2020-2023  润新知