Problem with listbox retaining selection after iExplore Back button is clicked.

I have an ASP.NET search page with two listboxes and a refresh button.

When listbox #2 is selected, it then redirects to the #2 content page.

If the user hits the iExplore Back button, the search page is shown with selected item highlighted in listbox #2.

When the user then attempts to select an item from listbox #1 or click on the refresh button, it still redirects to the #2 content page. It's like the page retains the listbox #2 selection.  

How I clear the select of listbox #2 when the user hits the Back button from the #2 content page?

Please show solution using VB.NET...
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Add this line to your Page_Load:


You'll see after that, if a user 'Backs' into a previous page, the listbox controls will all be unselected.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
seckelAuthor Commented:
gadget27 - Does it matter where it goes in Page_Load?

I tried what you suggested, but it did not work.  Still same problem...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)

    If Not Page.IsPostBack Then    
    End If
  End Sub
seckelAuthor Commented:

I got your suggestion to work.  Thanks a lot!
Right at the head of Page_Load should be fine, as you have done. If there are other postback events on that page other than the clicking of a button which causes a redirect, that may cause this not to work. Along with the line you just added, try adding SmartNavigation="True" to the @Page Directive in your .ASPX page. If that doesn't do it for you, would you post your code to this page so that I can look at it in more detail?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.