Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Drop Down Box and the Back Button

Drop Down Box and the Back Button

Scheduled Pinned Locked Moved ASP.NET
helpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Angel Reyes
    wrote on last edited by
    #1

    I'm having the following problem... 1) User is on PageA.aspx, the page contains a Drop Down List with the values "A", "B", "C" and AutoPostBack set to true...Value "A" is selected. 2) User changes the Drop Down List Value to "C" 3) User click the browsers "Back" button, the page is displayed. Visually the value "C" is still selected (it should be "A"), but when I look at the source I see that "A" has the "Selected" value set. I've verified the issue with both IE and FireFox. How can I ensure that the correct value is visually selected? Any help would be appreciated.

    R 1 Reply Last reply
    0
    • A Angel Reyes

      I'm having the following problem... 1) User is on PageA.aspx, the page contains a Drop Down List with the values "A", "B", "C" and AutoPostBack set to true...Value "A" is selected. 2) User changes the Drop Down List Value to "C" 3) User click the browsers "Back" button, the page is displayed. Visually the value "C" is still selected (it should be "A"), but when I look at the source I see that "A" has the "Selected" value set. I've verified the issue with both IE and FireFox. How can I ensure that the correct value is visually selected? Any help would be appreciated.

      R Offline
      R Offline
      Rocky Moore
      wrote on last edited by
      #2

      Probably has to do with viewstate of the page depending on what is cached. Surprised you would have the same problem on both since IE does not refresh after the back and Mozilla (and others) do not. You could provide a means for moving back and on the server, keep count of every postback event. When the click your method to go back, you would issue the javascript to send the browser back the number of pages based on the number of postbacks you recieved. This will put them to the previous page and not the same page with different values. Rocky <>< www.HintsAndTips.com - Includes Developer Tips www.MyQuickPoll.com - 2004 Election poll is #33

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups