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

Ajax 复杂数据类型使用基础

复杂数据类型使用基础
•公有属性或公有Field会被释放和接受
•容器对象
–实现IList接口的对象
–实现IDictionary接口的对象
•Key必须是String
WebService2.cs Code:
using System;
using System.Collections;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
/// <summary>
///WebService2 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class WebService2 : System.Web.Services.WebService {
public WebService2 () {
//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
}
[WebMethod]
public Employee HelloWorld(Employee employee) {
employee.salary = employee.salary * 2;
return employee;
}
[WebMethod]
public System.Collections.Generic.List<int> ReList(System.Collections.Generic.List<int> list)
{
list.Reverse();
return list;
}
[WebMethod]
public System.Collections.Generic.IDictionary<string, Employee> GetEmployee()
{
System.Collections.Generic.Dictionary<string, Employee> employee = new System.Collections.Generic.Dictionary<string, Employee>();
Employee employee1 = new Employee();
employee1.fristname = "churen";
employee1.lastname = "youzi";
employee1.salary = 10000;
employee[employee1.fullname] = employee1;
Employee employee2 = new Employee();
employee2.fristname = "youzi";
employee2.lastname = "churen";
employee2.salary = 20000;
employee[employee2.fullname] = employee2;
return employee;

}
}
Default4.aspx Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww


相关文档:

Ajax获取后台数据

//ajax 获取数据
//脚本
var showResp=0;
function GetXmlHttpObject(handler)
{
var objXmlHttp = null;
if (document.all)//!window.XMLHttpRequest
{
// 创建IE中的XMLHttpRequest对象“XMLHTTP”
var clsids = ["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP. ......

AJAX中的请求方式以及同步异步的区别请求方式

请求方式,分为GET与POST:
 
GET
 
最为常见的HTTP请求,普通上网浏览页面就是GET。GET方式的参数请求直接跟在URL后,以问号开始。(JS中用window.location.search获得)。参数可以用encodeURIComponent进行编码,使用方式:
 
var EnParam = encodeURIComponent(param);
URL只支持大约2K的长度,即2 ......

ajax原理

 ajax全称Asynchronous JavaScript and Xml ,异步传输。
    异步传输是面向字符的传输,它的单位是字符;而同步传输是面向比特的传输,它的单位是帧,它传输的时候要求接受方和发送发的始终保持一致的。
   异步传输是将比特分成小组来进行传输。一般每个小组的一个8位字符,在每个小组的 ......

ajax Repeater 分页例子

一个简单ajax repeater分页demo 改进版. 代码如下..
<a href="javascript:void(0)" mce_href="javascript:void(0)" onclick="getData(0)">1</a>
<a href="javascript:void(0)" mce_href="javascript:void(0)" onclick="getData(1)">2< ......

AJAX框架的经验介绍

AJAX是WEB2.0的基石,现在网上流行几种开源的AJAX框架,比如:jQuery,Mootools,Dojo,Ext JS等等。
让我们来看看选择AJAX框架的基础:
◆你的项目需求(即你需要哪些特性,例如是否要求做出精美的界面、特效或其它功能)
◆是否支持A等级的浏览器(IE, Firefox等)?
◆文档的质量:是否完善(包含教程,API,代码示例等 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号