上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 在操作前首先我们要引入jquery js,本文是在aspx页面操作,效率相对ashx低些,主要有下面几种情况来调用。1,无参的调用注意点:方法一定要是静态的方法且要有[WebMethod]的声明using System.Web.Script.Services; [WebMethod] public static string SayHello() { return "Hello Ajax!"; }前台<JQuery>:$(function() { $("#btnOK").click(function() { $.ajax({ ... 阅读全文
posted @ 2012-09-10 11:24 aking96 阅读(586) 评论(0) 推荐(1)
摘要: <form id="form1" runat="server"> <div> <input id="Button2" type="button" value="Save" onclick="ForData();" /> <input id="Button1" type="button" value="Add" onclick="AddTr();" /> 阅读全文
posted @ 2012-09-09 15:44 aking96 阅读(458) 评论(0) 推荐(0)
摘要: 首先手动建个DataSetpublic DataSet BulidDataSet() { DataSet ds=new DataSet(); DataTable dt = new DataTable(); DataColumn col = new DataColumn("姓名",typeof(string)); col.MaxLength = 20; dt.Columns.Add(col); //注意是dt.columns 然后ADD ... 阅读全文
posted @ 2012-09-06 15:02 aking96 阅读(247) 评论(0) 推荐(0)
摘要: 1.首先生成配置文件。服务代理,首先添加服务引用在地址栏里输入上文服务端创建的Uri地址2.点击确定将生成配置文件<system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00: 阅读全文
posted @ 2012-09-06 13:30 aking96 阅读(244) 评论(0) 推荐(0)
摘要: WCF协定以及服务逻辑实现之后,如果客户端能够对其进行调用,则需要将上文的服务协定运行起来,运行服务协定需要创建服务终结点、地址、激活元数据交换、以及最终的服务启动和停止功能1.创建基本地址和服务主机 Uri baseAddress = new Uri("http://localhost:8000/ServiceModelSamples/Service");//创建基本地址 ServiceHost selfHost = new ServiceHost(typeof(CalculatorService),baseAddress);//创建服务主机2.添加服务终结点 selfH 阅读全文
posted @ 2012-09-06 13:22 aking96 阅读(252) 评论(0) 推荐(0)
摘要: 1.首先创建控制台应用程序,添加引用System.ServiceModel2.添加命名空间using System.ServiceModel3.定义服务协定。服务协定是描述服务需要实现的一系列接口,该接口定义了服务要实现的方法及属性描述。例如: [ServiceContract(Namespace =" WCFService")] public interface IService { [OperationContract] double Add(double n1, double n2); [OperationContract] ... 阅读全文
posted @ 2012-09-06 13:10 aking96 阅读(229) 评论(0) 推荐(0)
摘要: textarea默认不支持maxlength属性。 <html> <head> <title>JQuery为textarea添加maxlength</title> <script type="text/javascript" src="jquery-1.4.js"></script> </head> <body> <textarea style="width:300px; height:60px;" maxlength="1 阅读全文
posted @ 2012-09-05 09:18 aking96 阅读(1029) 评论(0) 推荐(0)
摘要: 关于uploadify3.1版本参数使用详解使用://绑定的界面元素<inputid='gallery'type='file'/>$("#gallery").uploadify({设置参数,参数如下.});设置的属性:id: jQuery(this).attr('id'),//绑定的input的ID langFile: 'http://www.static-xxx.nu/uploader/uploadifyLang_en.js',//语言包的路径,能设置所有的提示文字 swf: 'http: 阅读全文
posted @ 2012-09-05 09:08 aking96 阅读(28637) 评论(1) 推荐(2)
摘要: 最近做项目中碰到上传需要显示进度的问题,通过uploadfiy很好的解决了这个问题不过(IE9出现了按钮不能点击的问题,至今仍找不到良策)在使用uploadfiy3.2版本时需要下载jquery.tmpl.min.js并引用在Jquery下面 $("#uploadify").uploadify({ 'uploader': '/LZKS/Handler/BigFileUpLoadHandler.ashx', 'swf': '/LZKS/Scripts/uploadify/uploadify.swf', ' 阅读全文
posted @ 2012-09-04 18:10 aking96 阅读(26530) 评论(14) 推荐(4)
摘要: Out Ref用法 Out的使用,可以使void修饰的方法传出参数, 在使用前需定义参数,可以不赋值。 out的参数进入了方法后首先会被清空ref是传递参数的地址,out是返回值,两者有一定的相同之处,不过也有不同点。 int x,y;static void outTest(out int x, out int y) {//离开这个函数前,必须对x和y赋值,否则会报错。 //y = x; //上面这行会报错,因为使用了out后,x和y都清空了,需要重新赋值,即使调用函数前赋过值也不行 x = 1; y = 2; } static void refTest(ref int x, ref ... 阅读全文
posted @ 2012-09-04 17:58 aking96 阅读(293) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 下一页