c#怎么获得webbrowser中url的参数?

2025-01-19 17:18:17
推荐回答(2个)
回答1:

string url = webbrowser1.url; //只要有URL就可以了

int IStart = url.IndexOf("&ie=");
int IEnd = url.IndexOf('&',IStart);
if (IEnd < 0) IEnd = url.Length - IStart;
else IEnd -= IStart;
string outstr = url.SubString(IStart,IEnd);

回答2:

Request.QueryString["&ie"]