您现在的位置是:网站首页> 编程资料编程资料
ASP.NET中Ajax怎么使用_实用技巧_
2023-05-24
423人已围观
简介 ASP.NET中Ajax怎么使用_实用技巧_
在ASP.NET中应用Ajax的格式如下:
前台代码(用JQuery库)
$.ajax({ type: "POST", async: true, url: "../Ajax/ajax.ashx", dataType: "html", data: null success: function (result) { //do successful sth }, error: function (XMLHttpRequest, textStaus, errThrown) { //do error sth } })Ajax(一般性处理程序)中代码如下:
public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; string result = "Hello World"; context.Response.Write(result); }以上所述是小编给大家介绍的ASP.NET中Ajax使用方法的相关知识,希望对大家有所帮助,如果大家想了解更多内容,敬请关注网站!
您可能感兴趣的文章:
相关内容
- ASP.NET自带对象JSON字符串与实体类的转换_实用技巧_
- .net实体类与json相互转换_实用技巧_
- ASP.NET 文件压缩解压类(C#)_实用技巧_
- ASP.NET Core 1.0 部署 HTTPS(.NET Core 1.0)_实用技巧_
- win10下ASP.NET Core部署环境搭建步骤_实用技巧_
- 基于.Net实现前端对话框和消息框_实用技巧_
- asp.net GridView中使用RadioButton单选按钮的方法_实用技巧_
- asp.net Checbox在GridView中的应用实例分析_实用技巧_
- asp.net中GridView编辑,更新,合计用法示例_实用技巧_
- ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统之前端页面框架构建源码分享_实用技巧_
