WEB开发网
开发学院图形图像Flash Flash ActionScript 3.0(3) - 以文本形式、XML形式... 阅读

Flash ActionScript 3.0(3) - 以文本形式、XML形式和JSON形式与ASP.NET通信

 2008-11-17 11:49:50 来源:WEB开发网   
核心提示:本文示例源代码或素材下载 示例Text.aspx.csusing System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;usi

本文示例源代码或素材下载

示例

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();
  }
}

1 2 3  下一页

Tags:Flash ActionScript 文本

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接