Hi I have here a simple representation of the page I want to do.

I want to get the hidden field values of page2.aspx and pass it to the label of page1.aspx using c#.
Can you guys help me tnx :)
Hi I have here a simple representation of the page I want to do.

Can you guys help me tnx :)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Chandu KumawatPosted Mar 23, 2016, 1:08 AM
Francis SusaimichaelPosted Mar 22, 2016, 11:43 AM
Try this:
webform2.aspx
{
protected void Page_Load(object sender, EventArgs e)
{
// Fill hidden values with values
hdnFirst.Value = "10";
hdnSecond.Value = "20";
Session["First"] = hdnFirst.Value;
Session["Second"] = hdnSecond.Value;
Response.Redirect("WebForm1.aspx");
}
}
{
protected void Page_Load(object sender, EventArgs e)
{
lblFirst.Text = Convert.ToString(Session["First"]);
lblSecond.Text = Convert.ToString(Session["Second"]);
}
}
ali tuncerPosted Mar 22, 2016, 10:10 AM
https://msdn.microsoft.com/tr-tr/library/6c3yckfw(v=vs.100).aspx