C#webbrowser如何清除Cookie,我在winform中加入了一个WebBrowser,用来实现自动登录
3个回答
展开全部
先贴个CSDN的答案
我也在研究中~
//清空当前浏览站点的cookie
//提示是否清空
if (!AllForms.AskForConfirmation("Proceed to remove cookies from "
+ m_CurWB.LocationUrl + " ?", this))
return;
this.Cursor = Cursors.WaitCursor;
//调用ClearAllCookies方法,这里的frmCacheCookie是frmCacheCookie窗体类
iCount = m_frmCacheCookie.ClearAllCookies(m_CurWB.LocationUrl);
bshowform = false;
this.Cursor = Cursors.Default;
MessageBox.Show(this, "Deleted " + iCount.ToString() +
" Cooikes from\r\n" + m_CurWB.LocationUrl,
"Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
我也在研究中~
//清空当前浏览站点的cookie
//提示是否清空
if (!AllForms.AskForConfirmation("Proceed to remove cookies from "
+ m_CurWB.LocationUrl + " ?", this))
return;
this.Cursor = Cursors.WaitCursor;
//调用ClearAllCookies方法,这里的frmCacheCookie是frmCacheCookie窗体类
iCount = m_frmCacheCookie.ClearAllCookies(m_CurWB.LocationUrl);
bshowform = false;
this.Cursor = Cursors.Default;
MessageBox.Show(this, "Deleted " + iCount.ToString() +
" Cooikes from\r\n" + m_CurWB.LocationUrl,
"Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询