Ashx+Jquery(Ajax)案例
来源:互联网 发布:2g和3g网络的显示 编辑:程序博客网 时间:2024/05/17 01:30
jquery端:
function GetCredit(credit) {$.ajax({
type: "GET",
url: "../Ashx/GetCredit.ashx",
customerID: 'text',
cache: false,
data: { customerID: credit },
success: function (result) {
$("#<%=hidCredit.ClientID %>").val(result);
alert("当前可用预存款:" + result + "元");
}
})
Ashx端:
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string credit = "0";
if (!string.Empty.Equals(SalesCommon.GetIsNullOrEmpty(context.Request.QueryString["customerID"])))
{
string customerID = context.Request.QueryString["customerID"];
string sql = "select credit from crm_customer where customer_id=@customerID";
sql = SqlUtil.setNumber(sql, "@customerID", customerID);
DataTable dt = SalesCommon.QueryTable(sql);
if (dt != null && dt.Rows.Count > 0 && !string.Empty.Equals(SalesCommon.GetIsNullOrEmpty(dt.Rows[0]["credit"]))) credit = dt.Rows[0]["credit"].ToString();
}
context.Response.Write(credit);
context.Response.Cache.SetNoStore();
context.Response.Flush();
}
- Ashx+Jquery(Ajax)案例
- jquery+ajax+ashx
- Jquery+ashx实现Ajax
- jquery+ajax+ashx
- Jquery+ashx实现Ajax
- Jquery+ashx实现Ajax
- jquery+ajax+ashx。ashx的使用方法
- jquery ajax json ashx实用技巧
- jquery+ajax+ashx Ajax异步数据交互
- ajax 解决方案(Newtonsoft.Json +jQuery +ashx)
- ajax入门,jQuery+ashx (一)
- ajax入门,jQuery+ashx (二)
- ajax图片上传(asp.net +jquery+ashx)
- jquery ajax,ashx,json用法小结
- jquery ajax,ashx,json用法小结
- Jquery Ajax 调用 ashx 返回结果
- ashx+jquery+ajax 不多数 上代码
- 【.Net码农】Jquery+ashx实现Ajax
- Android开发之6步教你自定义view
- 【五年】Java打怪升级之路
- 原生JS编写popup
- 新技术跟踪
- android:configChanges属性
- Ashx+Jquery(Ajax)案例
- SQLServer学习笔记
- 直接排序
- 全志sunxi u-boot 配置过程简析
- log4j:ERROR Attempted to append to closed appender named [null].
- 后盾网Laravel 5.2开发实战视频
- ContentProvider ContentResolve
- 网站运营初期,如何有效提高关键词的排名?
- notepad++更改字体大小和颜色