Hunter的大杂烩 技术学习笔记

2013-10-30

c# webbrowser控件设置cookie

Filed under: 技术话题 — hunter @ 10:15 pm

需要用到winapi

[DllImport(“wininet.dll”, CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool InternetSetCookie(string lpszUrlName, string lbszCookieName, string lpszCookieData);
第一个参数是cookie针对的域名
InternetSetCookie(“www.qq.com”, “userid”, “10000”);

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress