evglynn
evglynn

Reputation: 327

Pass a URL Parameter to repopulate page

I currently have a page that is populated using a filter, which passes the parameters of the filter via URL.

I'd like to catch those parameters and give the user the opportunity to return to the page with the same filter applied to their view. Essentially, it's a back button. AKA: pass the parameters back into the URL so it repopulates the page.

I hope that made sense. Any help is appreciated! Thank you!

Upvotes: 1

Views: 205

Answers (1)

Msonic
Msonic

Reputation: 1456

You could store the filter values in a session variable or in a cookie.

Session variable:

Session("MyCustomFilter") = "FilterValue"

Cookie:

Dim cookie As HttpCookie
cookie = New HttpCookie("MyCustomFilter")
cookie.Values.Add("MyCustomFilter", "FilterValue)

While a session variable is easier to use, it will not be saved if you close the browser, while cookies will be saved and can be used later on.

Note: Added a more precise answer, based on my comment.

Upvotes: 3

Related Questions