private string ControlMarkup(Control c)
        {
            StringWriter   sw = new StringWriter();
            HtmlTextWriter tw = new CleanHtmlTextWriter(sw);

            c.RenderControl(tw);
            return(sw.ToString());
        }
 static void Main ()
 {
     HtmlTextWriter w = new CleanHtmlTextWriter (Console.Out);
     w.AddAttribute (HtmlTextWriterAttribute.Name, "abcd");
     w.AddAttribute (HtmlTextWriterAttribute.Id, "efg");
     w.RenderBeginTag (HtmlTextWriterTag.Input);
     w.RenderEndTag ();
     Console.WriteLine ();
 }
Exemplo n.º 3
0
        private void Render(CheckBoxList list, string expected, string test)
        {
            StringWriter   sw = new StringWriter();
            HtmlTextWriter tw = new CleanHtmlTextWriter(sw);

            sw.NewLine = "\n";

            list.RenderControl(tw);
            HtmlDiff.AssertAreEqual(expected, sw.ToString(), test);
        }
        private void ShowControlsRecursive(Control c, int depth)
        {
            StringWriter   sw = new StringWriter();
            HtmlTextWriter tw = new CleanHtmlTextWriter(sw);

            c.RenderControl(tw);
            Console.WriteLine(sw.ToString());

            Console.WriteLine(c);

            foreach (Control child in c.Controls)
            {
                ShowControlsRecursive(child, depth + 5);
            }
        }
		private void Render (CheckBoxList list, string expected, string test)
		{
			StringWriter sw = new StringWriter ();
			HtmlTextWriter tw = new CleanHtmlTextWriter (sw);
			sw.NewLine = "\n";

			list.RenderControl (tw);
			HtmlDiff.AssertAreEqual (expected, sw.ToString (), test);
		}
Exemplo n.º 6
0
		private void ShowControlsRecursive (Control c, int depth) {
			 StringWriter sw = new StringWriter ();
			 HtmlTextWriter tw = new CleanHtmlTextWriter (sw);

			 c.RenderControl (tw);
			 Console.WriteLine (sw.ToString ());

			Console.WriteLine (c);

			foreach (Control child in c.Controls)
				ShowControlsRecursive (child, depth + 5);
		}
Exemplo n.º 7
0
		private string ControlMarkup(Control c) {
			StringWriter sw = new StringWriter ();
			HtmlTextWriter tw = new CleanHtmlTextWriter (sw);

			c.RenderControl (tw);
			return sw.ToString ();
		}
Exemplo n.º 8
0
	static void Main ()
	{
		HtmlTextWriter w = new CleanHtmlTextWriter (Console.Out);
		w.AddAttribute (HtmlTextWriterAttribute.Name, "abcd");
		w.AddAttribute (HtmlTextWriterAttribute.Id, "efg");
		w.RenderBeginTag (HtmlTextWriterTag.Input);
		w.RenderEndTag ();
		Console.WriteLine ();
	}