S
Sully
I know this is a basic question, but I cannot find the answer.
I have a 3 LinkButtons on the masterpage that set a session variable,
this session variable does not get relayed to the content page until
there are 2 postbacks.
MasterPage:
protected void lbtn01_Click(object sender, EventArgs e)
{
Session["BOB"] = "01";
}
protected void lbtn02_Click(object sender, EventArgs e)
{
Session["BOB"] = "02";
}
protected void lbtn03_Click(object sender, EventArgs e)
{
Session["BOB"] = "03";
}
ContentPage:
if (Session["BOB"] != null)
{
lblDisplay.Text = Session["BOB"].ToString();
}
else
{
lblDisplay.Text = "HELLO WORLD";
}
I know I probably need to use Page_Init, but I am not sure how. Any
answers or ideas would be appreciated.
Thanks in advance.
-Sully
I have a 3 LinkButtons on the masterpage that set a session variable,
this session variable does not get relayed to the content page until
there are 2 postbacks.
MasterPage:
protected void lbtn01_Click(object sender, EventArgs e)
{
Session["BOB"] = "01";
}
protected void lbtn02_Click(object sender, EventArgs e)
{
Session["BOB"] = "02";
}
protected void lbtn03_Click(object sender, EventArgs e)
{
Session["BOB"] = "03";
}
ContentPage:
if (Session["BOB"] != null)
{
lblDisplay.Text = Session["BOB"].ToString();
}
else
{
lblDisplay.Text = "HELLO WORLD";
}
I know I probably need to use Page_Init, but I am not sure how. Any
answers or ideas would be appreciated.
Thanks in advance.
-Sully