16 Aralık 2014 Salı

İNTERNET PROGRAMCILIĞI SESSİON KULLANIMI

Web form oluşturuyoruz.



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Session["adsoyad"] = TextBox1.Text;
        Session["mail"] = TextBox2.Text;
        Session["tel"] = TextBox3.Text;
        Session["şifre"] = TextBox4.Text;

        Response.Write("Kayıt oldunuz");
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("Default2.aspx");
    }
}


Hiç yorum yok:

Yorum Gönder