如何将字符串数据转换为richtextbox中的html
我在winform使用httpwebrequest获取响应现在我想在我的winform中将它显示为html页面,因为我使用的是richtextbox但它只是简单地显示文本而不是html,请告诉我怎么做到这一点是我的代码
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;
}
有一个.Net控件允许在winforms中编辑html,
看看http://winformhtmltextbox.codeplex.com/
链接地址: http://www.djcxy.com/p/8015.html上一篇: how to convert string data to html in richtextbox
下一篇: Getting (500) Internal Server Error with webresponse object
