易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

在NETBOX中使用Asp AJAX Response.CharSet解决方法

刚调试程序的时候报错后然后找的解决方法,现在发出来大家借鉴。
-----------------------
错误提示: 
运行时错误 800a01b6
对象不支持此属性或方法: Response.CharSet
--------------------------------------------------------------------- 
(百度一下,还有很多人遇到同样的错误) 
Micros ......

FireFox和IE 中 Ajax 同步执行

var Ajax = new Object;
Ajax.Sysch = function(url) {
var req;
var result = "";
//document .write ("hello")
if (window.XMLHttpRequest) {
//代码段1
// 非IE浏览器

req = new XMLHttpRequest();
//alert(req);
//req.setReque ......

ASP.NET AJAX 的 UpdatePanel 控件不是万能的

以下引用自 MSDN Magazine:
不论好坏,UpdatePanel 控件都是 ASP.NET AJAX 社区所喜爱的。我说“好”,是因为 UpdatePanel 使部分页面呈现变得相当简单,而说“坏”,是因为它的简便和易用性是以效率和令人啼笑皆非的带宽为代价的。
UpdatePanel 可以为一般的网页带来 AJAX 神奇的好处,但是它不能提 ......

Ajax add_beginRequest

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat=" ......

AJAX框架的经验介绍

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