Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to save search results so user can return from any detail page 2

Status
Not open for further replies.

ITking2009

Programmer
Aug 4, 2009
23
US
Here's what i am trying to do. I need to create a page which has 6-7 text boxes for various search criteria and user can enter either one or more than one search criteria. The same page displays the results of the search (orders) with hyperlink to details page for each ordernumber.

I am able to achieve this by posting the data to the same page with hyperlink in the grip for order coulumn and passing the order number in querysstring.

now what i am having trouble with is that the user has to have a button or link to come back to the same search page with data in the text boxes and search results.
i tried implementing it using javascript history.back()

so i was wondering if someone can suggest a different approach?

Thanks.
 
You could pass each textbox/value in the querystring and pass it back and forth, but this can become clumsy, but will work.

You could also create a search object that stores your values and hold it in session. Then use that object to re-popuulate your textboxes.
 
thanks Jbenson001, i am also inclined towards using an object, but
1. How can i immitate search button click programmatically?
2. Once i store the object in session do i need to cast it back to original object or i can use it just like any other object?
Thanks.
 
1. the user clicking "search" is just the human interaction portion. the actual querying of data is a function of the system. it doesn't matter whether the page is loaded for the first time, or the user clicks a button. you pass the parameters to the search objects and the results are returned.
2. yes

Jason Meckley
Programmer
Specialty Bakers, Inc.

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top