Guest User

Untitled

a guest
Jan 6th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7.  
  8. namespace WebApplication1
  9. {
  10.     public partial class WebForm1 : System.Web.UI.Page
  11.     {
  12.         protected void Page_Load(object sender, EventArgs e)
  13.         {
  14.             //this.Request.Cookies
  15.             //this.Request.Form.
  16.             if (!this.IsPostBack) //czy strona jest przesĹ‚ana ponownie
  17.             {
  18.  
  19.             }
  20.             //this.Session.Add("foo", "bar");
  21.             //odczytanie
  22.  
  23.                 if(this.Session["foo"] !=null){
  24.                 }
  25.         }
  26.         protected void button1_Click(object sender, EventArgs e)
  27.         {
  28.             HttpCookie cookie = new HttpCookie("foo", "bar");
  29.             //cookie.Expires.AddDays(2);
  30.             this.Response.AppendCookie(cookie);
  31.  
  32.             var cookies = this.Request.Cookies;
  33.             cookies.
  34.  
  35.  
  36.         }
  37.     }
  38. }
Add Comment
Please, Sign In to add comment