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
0 comments:
Post a Comment