Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. public partial class GetFromUser : System.Web.UI.Page
  2. {
  3.     protected void Page_Load(object sender, EventArgs e)
  4.     {
  5.         string requestData = ""; // The data sent in the request
  6.         Request.InputStream.Position = 0;
  7.         Response.ContentType = "text/plain";
  8.         using (var reader = new StreamReader(Request.InputStream))
  9.         {
  10.             requestData = reader.ReadToEnd(); // Reads the data from what was sent with the request
  11.             if (requestData == "tasks please")
  12.             {
  13.                 Response.Write(Session["tasks"].ToString());
  14.                 Session["tasks"] = "";
  15.                 Response.End();
  16.                
  17.             }
  18.             else if (requestData.Contains("procceses:"))
  19.             {
  20.                 Session["prcss"] = requestData;
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement