Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Web;
- namespace GenericHandlerRouting.Handlers
- {
- /// <summary>
- /// Хендлер, отрабатывающий по ссылке вида /Handlers/DataHandler.ashx?dataKey=some%20data
- /// </summary>
- public class DataHandler : IHttpHandler
- {
- public void ProcessRequest(HttpContext context)
- {
- context.Response.ContentType = "text/plain";
- context.Response.Write(context.Request["dataKey"]);
- }
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment