using System;
using System.Web;
namespace MyLib {
public class SimpleHandler : IHttpHandler {
public bool IsReusable {
get {
return true;
}
}
public void ProcessRequest(HttpContext context) {
context.Response.Write("SimpleHandler ");
context.Response.Write("The time is ");
context.Response.Write(DateTime.Now.ToString());
context.Response.Write(".
");
}
}
}
BuildSimpleHandler.bat
csc /target:library /reference:System.Web.dll
/out:MyLib.dll SimpleHandler.cs
HandlerWeb.config
type="MyLib.SimpleHandler" />