How to pass variables from one page to another?

Hello All
I want pass the current page variables to next page and further also.
How to do this?
I was able to handle this to next page by previous page variable property but not further.

You will want to use query strings.

Request.QueryString[“name”].

^^^^ Yup.

There may be other alternatives as well:

  • Using a Wizard control (if you want to collect information through a sequence of “pages”)
  • Using cross-page postbacks if you have more complex dependencies.

But in general using URL parameters will provide loose coupling (a good thing)

It’s also worth noting that depending on what you’re doing, you might not need 2 pages.

For example, you might have a form with a GridView and a DetailsView with one shown/hidden at a time.