V.V
V.V

Reputation: 883

How to pass the value from one asp page to another asp page using queryString?

How to pass the value from one asp.net page to another asp.net web page using queryString.It means test1.aspx and test2.aspx are two web pages.

In test1.aspx, i have the string value,

string abc="stackoverflow";

if i use like this

Request.Redirect("test2.aspx?numbers=" + abc); .It will not work.If i use like this i cant able to get abc value in test2.aspx page.

how to get this abc values into the test2.aspx?

Upvotes: 4

Views: 13617

Answers (1)

Priyank Patel
Priyank Patel

Reputation: 6996

Instead of

Request.Redirect("test2.aspx?numbers=" + abc); 

Use

Response.Redirect("test2.aspx?numbers=" + abc); 

To recieve the QueryString value in the test2.aspx page you can use

Request.QueryString["numbers"];

Upvotes: 7

Related Questions