Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- namespace WebApplication1
- {
- public partial class WebForm1 : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- //this.Request.Cookies
- //this.Request.Form.
- if (!this.IsPostBack) //czy strona jest przesłana ponownie
- {
- }
- //this.Session.Add("foo", "bar");
- //odczytanie
- if(this.Session["foo"] !=null){
- }
- }
- protected void button1_Click(object sender, EventArgs e)
- {
- HttpCookie cookie = new HttpCookie("foo", "bar");
- //cookie.Expires.AddDays(2);
- this.Response.AppendCookie(cookie);
- var cookies = this.Request.Cookies;
- cookies.
- }
- }
- }
Add Comment
Please, Sign In to add comment