how to pass ip-address to webBrowser control

情到浓时终转凉″ 提交于 2019-12-02 08:28:31

Just Write in your textbox http://74.125.236.211

or

textBox2.Text="http://74.125.236.211"

What you really want to do isn't clear to me but I'll take a wild guess, assuming you want the download the url in textBox2.Text using a proxy server and want to try proxies in file proxy.txt until one sucessfully works.

foreach (var proxy in File.ReadAllLines("proxy.txt"))
{
    try
    {
        using (var wc = new WebClient())
        {
            wc.Proxy = new WebProxy(proxy);
            string page wc.DownloadString(textBox2.Text);
            return page;
        }
    }
    catch { }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!