日期:2014-05-18  浏览次数:20844 次

C# webBrowser用显示网址
怎么判断里面的内容是否为网址。可以打开,就像QQ聊天对话框里面一样。当我输入www.baidu.com发送之后。可以直接点开网站

------解决方案--------------------
this.webBrowser1.Url = new System.Uri("http://baidu.com", System.UriKind.Absolute);

http://baidu.com 这个可以弄个textbox来获取要导航到的地址
------解决方案--------------------
处理WebBrowser1.Navigating
 //搜狗浏览器地址
 string path = "D:\\Program Files\\SogouExplorer\\sogouexplorer.exe";
 //打开链接
 System.Diagnostics.Process.Start(path + " " + e.Url.ToString);
 
------解决方案--------------------
探讨

处理WebBrowser1.Navigating
//搜狗浏览器地址
string path = "D:\\Program Files\\SogouExplorer\\sogouexplorer.exe";
//打开链接
System.Diagnostics.Process.Start(path + " " + e.Url.ToString);