Possible Duplicate:
Passing data between asp.net pages
how to pass value of TEXTBOX from one page to another page in ASP.NET c# I need, not by using URL string query method. I do need passing from one page to another without passing values by URL.
Use the session state.
Session["TextBoxValue"] = TextBox1.Text;
Then, retrieve it on the other page:
string val = Session["TextBoxValue"];
you can create a form in the first page, this form contains your required parameters and use an action redirect to another page like in this example:
<form method="post" action="yoursecondpage.aspx">
<input ... />
</form>
Another way is using a Server.Transfer("mySecondPage", true)
, in the second page, on Page_Load event you can cast "PreviousPage as MySecondPage" and get properties .
精彩评论