Back Button - Retain Values On Re-Submission

P

Penny Bond

Hi,

Any help or suggestions on this one would be gratefully appreciated:

I have 2 aspx pages one is called 'Query' and the other 'Details'. Query
page has a number of text boxes and drop down's for parameter selection, a
'Search' button and a grid that displays the results (the results contain
links to 'Details' page with query string params). The 'Details' Page
allows user to see detailed information on the selected product.

Okay my problem is this:

User types a product name into a text box in 'Query' page then clicks
'Search' button a postback on the page occurs then displaying the results in
the grid. User then clicks on one of the links in the results grid and the
'Details' page opens up. User then clicks 'back' button on their browser,
the 'Query' page is reshown with the previously entered text still
showing -> all is fine at this point. Then user selects a 'year' drop down
on the 'Query' Page (so they have as search parameters 'product name' in a
text box and and 'year' in a drop down). User then clicks 'Search' button.
Incorrect results are displayed and the 'year' drop down reverts back to
it's default value.

Behind the scene:
Whilst debugging I noticed after a user has selected the 'back' button,
selected 'year' and the 'search' button:
1. IsPostBack is False (obviously the page thinks it's 'new' which I gather
would be correct by design).
2. Whilst breaking on page load event and adding a watch on the 'year' drop
down it does not retain the newly selected value (it goes back to it's
default).
3. My click event for the button is not fired AT ALL).

Can anyone suggest how I can get around this? I need my click event to fire
so the correct db routine is called, grid populated correctly, etc.
Also how can I force the retaining of the 'year' selected value?

Basically i would like my user to be able to continue their searching where
they left off. I have considered using session variables for re-selecting
the correct parameter value, but there are quite a few controls and would
prefere a more elegant solution if anyone can think of one - plus I need my
click event to fire.

Many thanks

Tash
 
T

Trevor Benedict R

Do you have smart navigation enabled. If so try to disable it and try
again. I suspect it could be due to smart navigation.

Regards,

Trevor Benedict R
Microsoft Certified Solution Developer
 
P

Penny Bond

Hi Trevor,

Thanks for your reply. Smart navigation is definately not enabled -> no
references anywhere in my project to it.

Any other ideas?

Many thanks

Tash
 

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

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top