A class to intercept control rendering
Inheritance: System.Web.UI.HtmlTextWriter
Example #1
0
 private void IterateOver(ref string ret, System.Web.UI.Control parent, ControlRenderInteceptor cri)
 {
     foreach (System.Web.UI.Control c in parent.Controls)
     {
         IterateOver(ref ret, c, cri);
         switch (c.GetType().ToString())
         {
         case "System.Web.UI.WebControls.Literal":
             c.RenderControl(cri);
             ret += cri.LastOutput;
             break;
         }
     }
 }
Example #2
0
        /// <summary>
        /// Concacternates the web controls for a raw request
        /// </summary>
        /// <returns>A string of concacternated values</returns>
        private string ConcatControls()
        {
            if (_page == null)
            {
                return("");
            }

            string ret = "";

            ControlRenderInteceptor cri = _oF.GetInterceptor();

            foreach (System.Web.UI.Control formsearch in _page.Controls)
            {
                if (formsearch.GetType().ToString() == "System.Web.UI.HtmlControls.HtmlForm")
                {
                    IterateOver(ref ret, formsearch, cri);
                }
            }

            return(ret);
        }
Example #3
0
 private void IterateOver(ref string ret, System.Web.UI.Control parent, ControlRenderInteceptor cri)
 {
     foreach (System.Web.UI.Control c in parent.Controls)
     {
         IterateOver(ref ret, c, cri);
         switch (c.GetType().ToString())
         {
             case "System.Web.UI.WebControls.Literal":
                 c.RenderControl(cri);
                 ret += cri.LastOutput;
                 break;
         }
     }
 }