Saturday, February 6, 2010

.net control?

Hello,





My requirement is , i am getting the html as a stream and i have to display this stream in a web page using some control.





So which control is best suited for this and how to give the stream to this control??











any help will be highly appreciated..net control?
I'd run a div at the server and assign its InnerHTML or InnerText. You'd use InnerHTML if you want to display the stream-read page as HTML, and InnerText if you want it to render as text (that is, not interpret the HTML tags as tags).





%26lt;div id=';mydiv'; runat=';server';%26gt;%26lt;/div%26gt;





Dim objReader As New StreamReader (';yoururl.com'; )


Dim strOut As String = objReader.ReadToEnd()





Dim objControl As HtmlGenericControl = Page.FindControl( ';mydiv'; )


objControl.InnerHTML = strOut

No comments:

Post a Comment