Web Forms Question:

How to use QueryString in web forms?

Tweet Share WhatsApp

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"];
}

Download Microsoft Web Forms PDF Read All 11 Microsoft Web Forms Questions
Previous QuestionNext Question
How to create a dynamic control in dot net?How to use Sessions in web forms?