Session code
1st page
design;
name-textbox1.text;
color-textbox2.tex;
button
write code on button click
public partial class Styles_Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Session["email"] = TextBox1.Text;
Session["colour"] = TextBox2.Text;
Response.Redirect("two.aspx");
}
}
2nd page
design:
welcome Label1.Text
write code on page load
public partial class two : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = (string)Session["email"];
Label1.BackColor = System.Drawing.Color.FromName((string)Session["colour"]);
}
}
design;
name-textbox1.text;
color-textbox2.tex;
button
write code on button click
public partial class Styles_Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Session["email"] = TextBox1.Text;
Session["colour"] = TextBox2.Text;
Response.Redirect("two.aspx");
}
}
2nd page
design:
welcome Label1.Text
write code on page load
public partial class two : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = (string)Session["email"];
Label1.BackColor = System.Drawing.Color.FromName((string)Session["colour"]);
}
}