eg: In server side,
through coding, we have created a HTMLAnchor. Adding this to a Label's text requires in
string format.
private static string GetControlsAsString(Control ulControl)
{
string contents = null;
using (System.IO.StringWriter swriter = new System.IO.StringWriter())
{
HtmlTextWriter writer = new HtmlTextWriter(swriter);
ulControl.RenderControl(writer);
contents = swriter.ToString();
}
return contents;
}
private static string GetControlsAsString(Control ulControl)
{
string contents = null;
using (System.IO.StringWriter swriter = new System.IO.StringWriter())
{
HtmlTextWriter writer = new HtmlTextWriter(swriter);
ulControl.RenderControl(writer);
contents = swriter.ToString();
}
return contents;
}