1. Use querystring
response.redirect("secondpage.aspx?tempValue="textbox1.text);
string value= request.querystring["tempValue"].tostring();
2. use Session
Session[ "tempValue" ] = textbox1.Text;
String query = ( Session[ "tempValue" ] != null ) ? Session[ "tempValue" ].ToString() : String.Empty
3. use previos page concept
TextBox1.text="something";
if (PreviousPage != null)
{
TextBox tmpTextBox =
(TextBox) PreviousPage.FindControl("TextBox1");
if (tmpTextBox != null)
{
string value = tmpTextBox.Text.tostring();
}
}
Edit: Code has been formatted.