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

怎样调用1个登陆页面而不用输入用户名和密码,

2012-02-29 
怎样调用1个登陆页面而不用输入用户名和密码,在线等.....怎样调用1个登陆页面而不用输入用户名和密码,不要

怎样调用1个登陆页面而不用输入用户名和密码,在线等.....
怎样调用1个登陆页面而不用输入用户名和密码,不要告诉我在URL里面加入相关信息,我只知道在JAVA里面有软键盘,在C#中或ASP.NET中怎么做,恳请指点.

[解决办法]
</HEAD>
</SCRIPT>
<BODY onload= "document.all.LoadForm.submit(); ">
<form id= "LoadForm " action= "http://mail.shodemy.com.cn/WorldClient.dll?View=Main " target= "_top " method= "post ">
<table align= "center " width= "490 " border= "0 " cellpadding= "0 " cellspacing= "0 " id= "loginTable ">
<tr>
<td align= "center ">
<table border= "0 " cellpadding= "0 " cellspacing= "8 ">
<tr align= "center ">
<td align= "left " valign= "top " class= "loginText "> <b> 邮件地址: </b> </td>
<td align= "left " valign= "top "> <input class= "loginInput " type= "text " name= "User " size= "18 " value= "我的登录名 " onfocus= "showFocus(this) " onblur= "showBlur(this) " /> </td>
</tr>
<tr align= "center ">
<td align= "left " valign= "top " class= "loginText "> <b> 密码: </b> </td>
<td align= "left " valign= "top "> <input value= "Ab1116 " class= "loginInput " type= "password " name= "密码 " autocomplete= "off " size= "18 " onfocus= "showFocus(this) " onblur= "showBlur(this) " /> </td>
</tr>
<tr>
<td> &nbsp; </td>
<td align= "left " valign= "top "> <input class= "loginButton " type= "submit " name= "Logon " value= "登录 " /> </td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</BODY>
</HTML>

[解决办法]
使用post或get方式
[解决办法]
post方式给你一个例子.
sUrl = http://job.spforum.net/login/Index.asp;
///////////////////////////////////
private CookieContainer cc = new CookieContainer();

/////////////////////
string postData = "uUsername=avoid&uPassword=123456 ";
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] data = encoding.GetBytes(postData);

request = (HttpWebRequest)WebRequest.Create(sUrl);
request.Method = "POST ";
request.ContentType = "application/x-www-form-urlencoded ";
request.ContentLength = data.Length;
Stream newStream = request.GetRequestStream();
newStream.Write(data, 0, data.Length);

newStream.Close();

request.CookieContainer = cc;

response = (HttpWebResponse)request.GetResponse();
cc.Add(response.Cookies);
stream = response.GetResponseStream();
sHtml = new StreamReader(stream, System.Text.Encoding.Default).ReadToEnd();

------解决方案--------------------


http://community.csdn.net/Expert/topic/5438/5438002.xml?temp=.5894129
[解决办法]
参看 Avoid(好象又涨分了) ( ) 的例子就行了
他已经说的足够明白了
[解决办法]
如果有时间,你可以研究一下开源的
http://blog.joycode.com/liuhuimiao/archive/2003/10/09/1717.aspx

SSO不是几行代码就能完成的

热点排行