Web Forms Question:

Download Job Interview Questions and Answers PDF

How to use QueryString in web forms?

Microsoft Web Forms Interview Question
Microsoft Web Forms Interview Question

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 Interview Questions And Answers PDF

Previous QuestionNext Question
How to create a dynamic control in dot net?How to use Sessions in web forms?