Wednesday, September 20, 2006

HttpHandler in WebSite VS 2005

This example intended to case, when classes located in App_Code.

HttpHandler:

public class TestHandler : IHttpHandler
{
public TestHandler() {}

public void ToDo()
{
//....
}

public bool IsReusable
{
get { return true; }
}
void IHttpHandler.ProcessRequest(
               HttpContext context)      
{
ToDo();
}
}
 



Web.Config:
 <httpHandlers>
<add path="test.test" verb="*"
 type="TestHandler, App_Code" />
</httpHandlers>

No comments: