C# 使用WebBrowser控件的替代方法

C# 使用WebBrowser控件的替代方法,c#,C#,我目前正在使用linux,所以我在C#中使用WebBrowser控件时遇到问题,我在Ubuntu 12.04中运行MonoDevelop,显然WebBrowser控件使用IE,所以我的问题是,有没有办法使用HTTP函数从网站获取HTML,然后在我想要的框中解析它 this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point (0,

我目前正在使用linux,所以我在C#中使用WebBrowser控件时遇到问题,我在Ubuntu 12.04中运行MonoDevelop,显然WebBrowser控件使用IE,所以我的问题是,有没有办法使用HTTP函数从网站获取HTML,然后在我想要的框中解析它

this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point (0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size (20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.Size = new System.Drawing.Size (404, 178);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.Url = new System.Uri ("http://url.net/a.php", System.UriKind.Absolute);

我真正需要的是它的Linux/Unix兼容版本:)谢谢

不是我的,你可以阅读url链接

 public static String readWebLink(  String url)
            {
                System.Net.WebClient client = new System.Net.WebClient();
                byte[] data = client.DownloadData(url);
                String html = System.Text.Encoding.UTF8.GetString(data);
                return html;

            }


谢谢你

你会对这件事感兴趣的
   public static String readWebLink(  String url)
    {
     System.Net.WebClient webclient = new System.Net.WebClient();
     return  webclient.DownloadString(url);
     }