Hi @moondaddy ,
According to your requirement,I'm guessing that when you redirect to the second page,the value will be postback.
I suggest you could use session instead of Viewstate. Just like this:
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Text = HiddenField1.Value;
if (Session["test"] != null)
{
TextBox2.Text = Session["test"].ToString();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
HiddenField1.Value = "xxxxx";
Session["test"] = "It works";
}
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Yijing Sun