【文件属性】:
文件名称:.net ajax示例
文件大小:5KB
文件格式:RAR
更新时间:2012-05-31 05:07:48
ajax
/*
* 使用Ajax 验证商务卡的密码是否正确
* add by zhaoyue
* 2009-04-14
*/
var xmlHttp ;
var isTrue=false ;
function createXMLHttpRequest(){
if(window.ActiveXObject){
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP") ;
}else if(window.XMLHttpRequest){
xmlHttp=new XMLHttpRequest() ;
}
}
function checkPwd(){
var cardNo ;
var businessCard =document.getElementsByName("business_Card") ;
for(var i=0;iPassword error!" ;
}else{
document.getElementById("spanpwd").innerHTML="密码错误!" ;
}
isTrue=false ;
}else{
if(isEn==1){
document.getElementById("spanpwd").innerHTML="" ;
}else{
document.getElementById("spanpwd").innerHTML="" ;
}
isTrue=true ;
}
isPassTrue = isTrue;
}
}
}
public partial class TicketInside_BCPwdAjax : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
string cardNo = Request.QueryString["cardNo"].ToString();
string pwd = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Request.QueryString["pwd"].ToString(), "MD5"); ;
TBUSINESSCARD bc = new BusinessCardFacade().GetBusiCardByCardNoAndPass(cardNo, pwd);
if (null == bc)
{
Response.Write("");
}
else
{
Response.Write("密码正确");
}
}
catch (Exception ex)
{
LogHelper.error(ex.Message);
}
}
}
【文件预览】:
AJAX
----Suggest.aspx(3KB)
----hander.aspx.cs(409B)
----Test.aspx.cs(2KB)
----Suggest.aspx.cs(410B)
----hander.aspx(3KB)
----Handler.ashx(2KB)
----Test.aspx(93B)