Friday, September 7, 2007

Used Car Tow Dolly Sale

Serializing a class with events

A Sometimes you get the html code produced by any WebControl, is a native CustomControl or control. net such as the GridView.
For example if you wanted to email the result of binding a gridview you can use this simple function Private Function GetControlRendererHTML (ByVal Control As Control) As String Dim

SB As New StringBuilder () Dim SW As New System.IO.StringWriter
(SB) Dim
htmlTW As New HtmlTextWriter (SW) Control.RenderControl (htmlTW)

Dim HTML As String = SB.ToString ()

Return End Function HTML