zoukankan      html  css  js  c++  java
  • C#删除WebBrowser控件的Session

    因最近做一个成绩查询导出的程序,用到webbrowser控件,该查询的网站限制一个会话只能查询3次成绩,而我要查询4000多人的成绩。

    using System.Runtime.InteropServices;

    private const int INTERNET_OPTION_END_BROWSER_SESSION = 42;

    [DllImport("wininet.dll", SetLastError = true)]private static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int lpdwBufferLength);

    然后在需要清除session的地方使用

    InternetSetOption(IntPtr.Zero, INTERNET_OPTION_END_BROWSER_SESSION, IntPtr.Zero, 0);

  • 相关阅读:
    HTML5新增标签和属性
    HTML——表单标签
    HTML——表格标签
    js
    js
    js
    js
    js-02-2
    js
    selleck --手机端-- 销售打卡记录下载
  • 原文地址:https://www.cnblogs.com/aiwz/p/6153892.html
Copyright © 2011-2022 走看看