how to convert string data to html in richtextbox
我在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;
}
There is a .Net control which allows editing of html in winforms,
Take a look http://winformhtmltextbox.codeplex.com/
链接地址: http://www.djcxy.com/p/8016.html上一篇: Eval()=意外标记:错误
