积少成多Flash(3) - ActionScript 3.0 基础之以文本形式、XML形式和JSON形式与ASP.NET通信
2009-11-05 00:00:00 来源:WEB开发网介绍
Flash ActionScript 3.0 以文本形式与ASP.NET通信、以XML形式与ASP.NET通信和以JSON形式与ASP.NET通信
示例
Text.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Text : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string s = "name: " + Request.QueryString["name"] + "; age: " + Request.QueryString["age"];
Response.ClearContent();
Response.ContentType = "text/plain";
Response.Write(s);
Response.End();
}
}
Xml.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Xml : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string s = @"<?xml version=""1.0"" encoding=""utf-8""?>
<root>
<person name=""webabcd"" age=""27"">
<salary>1000</salary>
</person>
<person name=""webabcdefg"" age=""37"">
<salary>2000</salary>
</person>
<person name=""webabcdefghijklmn"" age=""47"">
<salary>3000</salary>
</person>
</root>";
Response.ClearContent();
Response.ContentType = "text/xml";
Response.Write(s);
Response.End();
}
}
Tags:积少成多 Flash ActionScript
编辑录入:爽爽 [复制链接] [打 印]- ››flash文件的压缩方法(swf文件压缩瘦身)
- ››Flash鼠绘教程:临摹徐悲鸿的骏马图
- ››Flash实例:AS3制作茶杯震动动画
- ››Flash AS 3.0实例教程:Main类打造发散效果
- ››Flash cs3仿真艺术设计3.6:运用遮罩打造焦点效果...
- ››Flash cs3仿真艺术设计4.1:阴影的基本运用
- ››Flash CS4教程:3d工具实例和骨骼工具
- ››flash加载外部文本文件的3种方法
- ››flash在有限的页面内制作大的地图
- ››Flash教程:AS代码制作计时器方法
- ››Flash AS教程:propertydata问题解决
- ››FlashFXP v4.0.0 Build 1486 RC2 [烈火汉化]
更多精彩
赞助商链接