紧急求助,都需要用到什么样的类,具体怎么做?最好给点源码!
解决方案 »
- this.dropdownlist..SelectedValue 提取不到值
- 新人求助
- 如何让XmlText的Value的值是nbsp?在线等
- 有关成员资格和角色管理的问题
- C#下如何使用win32库? 200分-------------------------------------------
- 请问高手,怎么样从后台代码中怎亲获得客户端的分辨率呀?
- 请帮帮我。我学不下去了啊。
- 再发一帖问问C# listview 的问题
- C#新人,请教各位大神图片显示问题!
- [灌水]Merry Christmas and Happy New Year!!!
- 如何取远程共享目录所在磁盘的大小和空域空间。
- Excel中怎么样复制sheet
那样可以用XMLHTTP~
http://www.cnblogs.com/ausoldier/archive/2005/08/10/211219.html
利用WebClient实现自动添写、提交表单
private void axWebBrowser1_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
{
IHTMLDocument2 HTMLDocument =(IHTMLDocument2)axWebBrowser1.Document; HTMLInputTextElement yh = (HTMLInputTextElement)HTMLDocument.all.item("yh",null);
yh.value = this.txtName.Text + currentID; HTMLInputTextElement pwd = (HTMLInputTextElement)HTMLDocument.all.item("pw",null);
pwd.value = this.txtPwd.Text; HTMLInputTextElement pwds = (HTMLInputTextElement)HTMLDocument.all.item("pws",null);
pwds.value = this.txtPwd.Text; HTMLInputTextElement who = (HTMLInputTextElement)HTMLDocument.all.item("who",null);
who.value = this.txtQuestion.Text; HTMLInputTextElement whois = (HTMLInputTextElement)HTMLDocument.all.item("whois",null);
whois.value = this.txtAnswer.Text; HTMLInputTextElement name = (HTMLInputTextElement)HTMLDocument.all.item("name",null);
name.value = this.txtName.Text ; HTMLInputTextElement email = (HTMLInputTextElement)HTMLDocument.all.item("email",null);
email.value = this.txtEmail.Text ; mshtml.HTMLSelectElement age = (HTMLSelectElement)HTMLDocument.all.item("age",null);
age.selectedIndex = 1; mshtml.HTMLSelectElement ss2 = (HTMLSelectElement)HTMLDocument.all.item("ss2",null);
ss2.selectedIndex = 1; mshtml.HTMLSelectElement education = (HTMLSelectElement)HTMLDocument.all.item("education",null);
education.selectedIndex = 1; HTMLFormElement form = (HTMLFormElement)HTMLDocument.all.item("member",null);
form.submit(); }
建立HttpWebRequest,设定好参数,提交就行了
我现在想先问一下HttpWebRequest和Response在登陆网站输入用户名和密码的时候怎么设置,小弟从没有用过这两个类,对于直接使用HTTP协议不太明白,哪里有资料给个链接也好。
我自己机器上有,现在在公司,找不到
来个难点的,假如点击的是WAP的网址呢?又该如何.