We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

HTMLUI not loading pages ..

I have a HTMLUI control on a form and am trying to load an internal uri. When I call the LoadHTML method on the response stream nothing loads. However, if I take the same stream and put it through a StreamReader and write the output to a console, I can see the full page output-ted on the console.

What am I missing?

string oxtUri = "http://internal.site.com";
Uri uri = new Uri( oxtUri );
WebRequest request = WebRequest.Create( oxtUri );
WebResponse response = request.GetResponse();

// This does not work and does not load the page.
Stream htmlStream = response.GetResponseStream();
if( htmlStream != null)
{
htmluiControl1.LoadHTML( htmlStream );
}

// Doing this however, prints the whole page on the console.
Stream receiveStream = response.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader readStream = new StreamReader( receiveStream, encode );
Console.WriteLine("\rResponse stream received.");
Char[] read = new Char[256];
//Reads 256 characters at a time.
int count = readStream.Read( read, 0, 256 );
Console.WriteLine("HTML...\r");
while (count > 0)
{
String str = new String(read, 0, count);
Console.Write(str);
count = readStream.Read(read, 0, 256*256);
}
Console.WriteLine("");
response.Close();
readStream.Close();

4 Replies

NR Nandakumar R Syncfusion Team September 28, 2006 09:35 PM UTC

Hi,

I was able to reproduce the LoadHTML(Stream str) is not loading the rendered stream from the given Uri. I have reported this issue to our developers. I will update you once I get back from them.

http://www.syncfusion.com/support/issues/htmlui/Default.aspx?ToDo=view&questId=2762

Please try loading the text rendered from the Stream in the HTMLUI control using the LoadFromString method(the text that was used to print in the Console.WriteLine()).

I have placed here a sample that renders the text from the Stream and loads that in the HTMLUI control.
DownloadHTMLPage.zip

Please try this and let me know if this helps.

Thank you for your interest in Syncfusion products.

Regards,
Nanda


JS Jason Sobell May 15, 2009 01:53 AM UTC

What happened with this problem?
I'm experiencing the same symptoms. Was it ever resolved?

Also, why is this problem report not selectable via the URL in the search results??

Jason


AD Administrator Syncfusion Team May 19, 2009 11:58 AM UTC

Hi Jason,

Thank you for using Syncfusion products.

The fix for this issue is expected to be available on 'June 13th'. The defect link provided in the last post cannot be viewed since we have stopped publishing the issue details in the website.

Please let me know if any concern.

Regards,
Jaya


AD Administrator Syncfusion Team June 15, 2009 03:49 AM UTC

Hi Jason,

Thanks for your patience.

The fix for this issue is postponed to 'July 10th'.

Please let me know if any concern.

Regards,
Jaya

Loader.
Live Chat Icon For mobile
Up arrow icon