SanSYS

Untitled

Mar 10th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. public class MyHandler : IHttpHandler
  2. {
  3.     public RequestContext RequestContext { get; set; }
  4.     public void ProcessRequest(HttpContext context)
  5.     {
  6.         int imageID = int.Parse((string)RequestContext.RouteData.Values["ImageID"]);
  7.         ...
  8.     }
  9. }
  10.  
  11. public class MyHandlerRouteHandler : IRouteHandler
  12. {
  13.     public IHttpHandler GetHttpHandler(RequestContext requestContext)
  14.     {
  15.         return new MyHandler() {RequestContext = requestContext};
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment