首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

模拟登入的时候post信息如何拼接

2013-02-28 
模拟登入的时候post信息怎么拼接?做一个模拟登入的功能, 这个是网站地址 http://feedstuffs.com/login.asp

模拟登入的时候post信息怎么拼接?
做一个模拟登入的功能, 
这个是网站地址 http://feedstuffs.com/login.aspx
ParametersBase.Container = new CookieContainer();
postData = "这里的内容怎么写?"
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] data = encoding.GetBytes(postData);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(loginUrl);
request.Method = "Post";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
request.KeepAlive = true;
request.CookieContainer = ParametersBase.Container;  

热点排行