Web Forms Question:
How to use QueryString in web forms?

Answer:
private void Button1_Click (object sender, System.EventArgs e)
{
string url;
url="anotherwebform.aspx?name=" +
TextBox1.Text + "&email=" + TextBox2.Text;
Response.Redirect(url);
}
Destination web form
private void Page_Load (object sender, System.EventArgs e)
{
Label1.Text=Request.QueryString["name"];
Label2.Text=Request.QueryString["email"];
}
{
string url;
url="anotherwebform.aspx?name=" +
TextBox1.Text + "&email=" + TextBox2.Text;
Response.Redirect(url);
}
Destination web form
private void Page_Load (object sender, System.EventArgs e)
{
Label1.Text=Request.QueryString["name"];
Label2.Text=Request.QueryString["email"];
}
Previous Question | Next Question |
How to create a dynamic control in dot net? | How to use Sessions in web forms? |