<%@ WebHandler Language="C#" Class="Ajax" %> using System; using System.Data; using System.Web; public class Ajax : IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/xml"; DatabaseClass Database = new DatabaseClass(System.Configuration.ConfigurationManager.AppSettings["connectionString"]); if (context.Request["SelectorID"] != null) { context.Response.Write(""); int SelectorID = Int32.Parse(context.Request["SelectorID"]); DataRow dr = Database.Selectors_GetBySelectorID(SelectorID); context.Response.Write(""); context.Response.Write((dr["Filename"] == DBNull.Value ? "noPhoto.gif" : (string)dr["Filename"])); context.Response.Write(""); context.Response.Write(""); context.Response.Write((dr["PhotoSetID"] == DBNull.Value ? "0" : dr["PhotoSetID"].ToString())); context.Response.Write(""); context.Response.Write(""); context.Response.Write((string)dr["Name"]); context.Response.Write(""); context.Response.Write(""); context.Response.Write(""); } Database.Dispose(); } public bool IsReusable { get { return false; } } }