C#WebBrowser怎么获取和设置Cookie的方法
1个回答
展开全部
[DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern bool InternetSetCookie(string UrlName, string CookieName, string CookieData);
private void GetData_Click(object sender, EventArgs e)
{
InternetSetCookie(url, "SESSIONID", Globals.ThisDocument.sessionID);
webBrowser1.Navigate(url);
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询