Help to parse URL in Response.Redirect(url)

  • Thread starter Thread starter VMI
  • Start date Start date
V

VMI

I'm a ASP.Net beginner, so please don't laugh :-))

In the button of my initial aspx page, I have this code that sends a URL
with parameters my other page:

url="ZMResult.aspx?Address1=
this.txt_add1.Text + "&Address2=" +
this.txt_add2.Text;
Response.Redirect(url);

What do I do in ZMResult.aspx so that I can read the contents of the URL and
then parse it to get the "Address1" and "Address2" values?

Thanks.
 
Never mind.
I found:
string sAdd1 = Request.QueryString["Address1"].ToString();
string sAdd2 = Request.QueryString["Address2"].ToString();
this.TextBox1.Text = sAdd1 + " " + sAdd2;

Thanks anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top