1

I am fetching the response using httpwebrequest in winform now i want to display it as html page in my winform for this i am using richtextbox but it is simply displaying me text not html please tell me how can do it here is my code for this

     Uri uri = new Uri("http://www.google.com");
     if (uri.Scheme == Uri.UriSchemeHttp) {
        HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
        request.Method = WebRequestMethods.Http.Get;
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        StreamReader reader = new StreamReader(response.GetResponseStream());
        string tmp = reader.ReadToEnd();
        richTextBox1.Text = tmp;
     }

3
  • duplicate: stackoverflow.com/questions/2627991/… ?? Commented Dec 26, 2013 at 10:59
  • @LearningByCoding i try this but it is not working that's why i ask Commented Dec 26, 2013 at 11:01
  • okay, but the thing is, as mentioned there in the answers, its not possible. So asking the same question which cannot be performed will not help my friend. I hope you understand that you will have to use some other controls. See the basic task of richtextbox is to show text with some additional benefits but not to show html contents. Commented Dec 26, 2013 at 11:03

1 Answer 1

0

There is a .Net control which allows editing of html in winforms,

Take a look http://winformhtmltextbox.codeplex.com/

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.