473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Back Button - Retain Values On Re-Submission

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
Nov 19 '05 #1
3 2387
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #2
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
"Trevor Benedict R" <tr********@yahoo.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #3
See if this helps.
http://www.dotnetbips.com/displayarticle.aspx?id=288

Once the users force a post, the View State should be accurate.

HTH

Trevor Benedict R
Microsoft Certified Solution Developer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: siliconmike | last post by:
Do most browsers retain form fillup memory of previous page ? That is when the user presses back button, the forms on the previous page come up filled. Comments? Thank you, Mike
1
by: J P Singh | last post by:
I have simple form where user enter the search criteria and the form is posted back to itself and runs a query based on the values that are entered. Everything is expect the values that the user...
4
by: Jonathan Strange | last post by:
I have a website that uses Forms, and if I complete the form fields, submit the form, realise that there was an error or omission, and then hit the Back button, the form fields are all empty. This...
1
by: RC | last post by:
I have an Access 2002 database with many tables and forms (but just to keep things simple, let's say the DB has one Table "Table1" and one Form "Form1"). I have managed to cobble together so much...
29
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. ...
3
by: Alan | last post by:
I have a form that contains many fields for the user to enter. After entering the data the user can click a link to open a new window, the new window contains six columns (pull down menu) and 30...
7
by: Sridhar | last post by:
Hi, I have a question regarding the Page_Load method and Back Button of Internet explorer. I have created a webform. In that webform I have several Text Boxes. Also I have two buttons. When I...
4
by: jay_dev | last post by:
i have this slight of problem my page displays a div tag each time a new info is inserted but if i hit the back history button,move back to an earlier page then come back to the one i was working...
1
by: Janroel | last post by:
Hi all, I have 2 webservers running IIS 6.0, and I use forms with get and post. When a form is sent, and the user hits the browser back button: Webserver 1 redisplays de original form data in...
4
by: PM ArunKumar | last post by:
i have two dropdown list in my form where the values in the list of second drop down changes based on the value i select in the first dropdown.(very similar to country and states list), here after...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.