1
votes

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;
     }

1
@LearningByCoding i try this but it is not working that's why i askAzad Chouhan
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.Nagaraj Tantri

1 Answers

0
votes

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

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