摘要: var $ = function (id) { return "string" == typeof id ? document.getElementById(id) : id;};function addEventHandler(oTarget, sEventType, fnHandler) { i 阅读全文
posted @ 2016-09-22 15:15 fightingyy 阅读(1492) 评论(0) 推荐(0) 编辑
摘要: [csharp] view plain copy print? #region DataTable 转换为Json字符串实例方法 /// <summary> /// GetClassTypeJosn 的摘要说明 /// </summary> public class GetClassTypeJosn 阅读全文
posted @ 2016-09-06 17:52 fightingyy 阅读(335) 评论(0) 推荐(0) 编辑
摘要: Jul142013 [C#] 读写App.config配置文件的方法 作者:xieyc 发布:2013-07-14 17:29 字符数:3433 分类:编程 阅读: 39,139 次 4条评论 我们经常会希望在程序中写入一些配置信息,例如版本号,以及数据库的连接字符串等。你可能知道在WinForm应 阅读全文
posted @ 2016-08-18 14:08 fightingyy 阅读(640) 评论(0) 推荐(0) 编辑
摘要: 在存储过程中使用事务时非常重要,使用数据库可以保持数据的关联完整性,在SQL Server存储过程中使用事务也很简单,举个例子: 说明:1、使用存储过程执行事务,需要开启XACT_ABORT参数(默认值Off),将该参数设置On,表示当执行事务时,如果出错,会将transcation设置为uncom 阅读全文
posted @ 2016-08-16 13:53 fightingyy 阅读(310) 评论(0) 推荐(0) 编辑
摘要: WebForm.aspx 页面通过 AJAX 访问WebForm.aspx.cs类中的方法,获取数据 WebForm1.aspx 页面 (原生AJAX请求,写法一) WebForm1.aspx 页面 (AJAX请求,写法二,一般情况下我们用这种) <head runat="server"> <tit 阅读全文
posted @ 2016-08-03 14:58 fightingyy 阅读(2072) 评论(0) 推荐(0) 编辑
摘要: 1)通过webservice,注意去掉注释[System.Web.Script.Services.ScriptService]这行前的注释 2)通过aspx.cs文件中的静态方法 3)通过aspx文件url WebForm1.aspx Code highlighting produced by Ac 阅读全文
posted @ 2016-08-03 14:43 fightingyy 阅读(654) 评论(0) 推荐(0) 编辑
摘要: Jquery Ajax调用aspx页面方法 在asp.net webform开发中,用jQuery ajax传值一般有几种玩法 1)普通玩法:通过一般处理程序ashx进行处理; 2)高级玩法:通过aspx.cs中的静态方法+WebMethod进行处理; 3)文艺玩法:通过WCF进行处理。 第一种和第 阅读全文
posted @ 2016-08-03 14:38 fightingyy 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 在WebForm下 开发ajax程序,需要借助于一般处理程序(*.ashx)或web服务(*.asmx),并且每一个ajax请求,都要建一个这样的文件,如此一来,如 果在一个项目中ajax程序多了,势必会产生一堆的.ashx或.asmx,虽然于程序本身无碍,但那一堆文件看上去总觉得有伤大雅。那么可不 阅读全文
posted @ 2016-08-03 13:58 fightingyy 阅读(2320) 评论(0) 推荐(1) 编辑
摘要: --前台$.ajax({ type: "POST", contentType: "application/json", url: "WebForm2.aspx/GetUserName", data: "{}", dataType: "json", success: function(){...... 阅读全文
posted @ 2016-08-01 10:15 fightingyy 阅读(406) 评论(0) 推荐(0) 编辑
摘要: ——————view 和control control //标准的写法:$.ajax({ type: "post", dataType: "json", contentType: "application/json", //注意:WebMethod()必须加这项,否则客户端数据不会传到服务端 dat 阅读全文
posted @ 2016-07-29 18:28 fightingyy 阅读(215) 评论(0) 推荐(0) 编辑