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. Back Button Problem

Back Button Problem

Scheduled Pinned Locked Moved Web Development
helpquestionjavasysadmintools
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.
  • R Offline
    R Offline
    RockyGuls
    wrote on last edited by
    #1

    I have 2 Web Pages page1.aspx and page2.aspx. On page1.aspx i am selecting values fom list box and transfering to page2.aspx using Button -- "Select".This works fine. Suppose user doesn't select any value from list box then message box pops up to user ...code for messagebox is like this Private Sub btnHighlightYears_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHighlightYears.Click If Lstbox_Years.SelectedValue.ToString() = "" Then MessageBox.Show("Please Select Atleast One Year") Else Server.Transfer("Acct_Details.aspx?type=h") End If End Sub Message box is a class and using java script and other controls it is made - which looks similar like a windows based application message box. Now on page1.aspx i have one more button - "Select All and Continue".This also works fine and transfers me to page2.aspx Problem ======= When i first click on Button -- "Select" and nothing is selected fom list box then message box pops up ...click okay and then click button - "Select All and Continue" and it takes me to pafe2.aspx. When i returns back to page1.aspx through Back button if IE/browser , the message box again pops up. Is it an error or an issue...How can i solve this ? Please help me. Thanks,

    G 1 Reply Last reply
    0
    • R RockyGuls

      I have 2 Web Pages page1.aspx and page2.aspx. On page1.aspx i am selecting values fom list box and transfering to page2.aspx using Button -- "Select".This works fine. Suppose user doesn't select any value from list box then message box pops up to user ...code for messagebox is like this Private Sub btnHighlightYears_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHighlightYears.Click If Lstbox_Years.SelectedValue.ToString() = "" Then MessageBox.Show("Please Select Atleast One Year") Else Server.Transfer("Acct_Details.aspx?type=h") End If End Sub Message box is a class and using java script and other controls it is made - which looks similar like a windows based application message box. Now on page1.aspx i have one more button - "Select All and Continue".This also works fine and transfers me to page2.aspx Problem ======= When i first click on Button -- "Select" and nothing is selected fom list box then message box pops up ...click okay and then click button - "Select All and Continue" and it takes me to pafe2.aspx. When i returns back to page1.aspx through Back button if IE/browser , the message box again pops up. Is it an error or an issue...How can i solve this ? Please help me. Thanks,

      G Offline
      G Offline
      g00fyman
      wrote on last edited by
      #2

      It pops up again because it is displaying the cached page that is in your history. I imagine the back button is similar to javascript:history.go(-1); I don't know if restricting the caching of the page will work or not, but i have a domain hosting control panel that always (seems to) re-request a page when i click the back button on the browser. This would be the result you are aiming for, then you can check server side if you want the message box code to be written into the page. g00fy

      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