易截截图软件、单文件、免安装、纯绿色、仅160KB

jQuery ajax upload image

$(function(){
new AjaxUpload('file1', {
action: 'uploadpic.asp',
name: 'form1',
data:{act:'uploadfile',FormName:'form1'},
autoSubmit:false,
responseType:'json',
onSubmit:function(file,ext){
if (!(ext && /^(jpg|png|gif)$/i.test(ext))){
alert('请您上传jpg|png|gif格式的图片!');
return false;
}
else{
$('#esave').show();
}
},
onComplete:function(file,response){
$('#esave').hide();
$('#pic').val(response.imgfile);
}
});
});


相关文档:

ajax 安全性

完全适用ASP.NET的认证机制
–可以使用FormsAuthentication
•WebService方法可以操作Cookie
–Impersonation
–PrincipalPermission
WebService7.cs Code
using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
usi ......

Ajax 错误处理

错误处理
•调用时可以提供一个额外的错误回调函数
•包括超时和服务器端抛出的异常
•超时只能设置在WebService级别
–或者设置在PageMethods对象上
–无法在每个MethodCall时指定
•Sys.Net.WebServiceError
–timedout、message、exceptionType、stackTrace属性
ErrorHandling.a ......

Ajax 客户端代理的作用

客户端代理的作用
在对象里做了一个标记
–“__type” = “ComplexType.Color”
服务器端根据标记选择反序列化的目标类型
可出现“多态”效果
Employee.cs Code:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Secu ......

asp.net mvc ajax 外部js 异步递交 form的实现

页面文件类似:
<% using (Ajax.BeginForm("AjaxUpdate", 123, new AjaxOptions {
Confirm = "confirm str", LoadingElementId = "idLoading", UpdateTargetId
= "textEntered", OnSuccess = "validateForm" },new{id="idMyForm"}))
  &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号