<%@ WebHandler Language="C#" Class="GetProvince" %>
using System;
using System.Web;
public class GetProvince : IHttpHandler {
Class2 classin=new Class2();
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
System.Data.DataSet ds=classin.getProvince();
System.Data.DataTable dtb= ds.Tables[0];
context.Response.Write("document.write('<ul>');\n");
for(int i=0;i<dtb.Rows.Count;i++)
{
string getinfo=dtb.Rows[i]["PidName"].ToString();
context.Response.Write("document.write('<li>');\n");
// context.Response.Write("document.write('<a href=\"" + dr["LinkUrl"] + "\">');");
context.Response.Write("document.write('<a class='hide' href='#'>');\n");
context.Response.Write("document.write('aaaaaaaaaaaa');\n");
//context.Response.Write("document.write(" + getinfo + ");\n");
context.Response.Write("document.write('</a>');\n");
context.Response.Write("document.write('</li>');\n");
}
context.Response.Write("document.write('</ul>');\n");
}
public bool IsReusable {
get {
return false;
}
}
}
<script type="text/javascript" src="/Tools/Advert_js.ashx?id=1"></script>