SanSYS

sansys.net: http://goo.gl/92CHdD

Mar 11th, 2015
8,568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using System.Web;
  2.  
  3. namespace GenericHandlerRouting.Handlers
  4. {
  5.     /// <summary>
  6.     /// Хендлер, отрабатывающий по ссылке вида /Handlers/DataHandler.ashx?dataKey=some%20data
  7.     /// </summary>
  8.     public class DataHandler : IHttpHandler
  9.     {
  10.         public void ProcessRequest(HttpContext context)
  11.         {
  12.             context.Response.ContentType = "text/plain";
  13.             context.Response.Write(context.Request["dataKey"]);
  14.         }
  15.  
  16.         public bool IsReusable
  17.         {
  18.             get
  19.             {
  20.                 return false;
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment