CS(C#Code)部分:
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;
namespace AJAX
{
public partial class ajaxExamp : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request["callback"] != null)
{
switch (Request["callback"])
{
case "1":
Response.Write(DateTime.Now.Millisecond);
break;
}
Response.End();
}
}
}
}
页面部分:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ajaxExamp.aspx.cs" Inherits="AJAX.ajaxExamp" %>