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. Back and Next button

Back and Next button

Scheduled Pinned Locked Moved ASP.NET
javascripttutorialdiscussionannouncementworkspace
3 Posts 3 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.
  • J Offline
    J Offline
    J Liang
    wrote on last edited by
    #1

    Hi, Let me go straight to the point. I am doing a something like a wizard we use to setup some programs or system. I have 5 pages which all 5 pages is link together with 'Back' and 'Next' button. It was working fine until I tried the Back button and click Next again. I find it some what difficult to detect that the user clicked back and therefore when the user click next again, I suppose to do 'Update' and not 'Add' and also sometimes what the user typed in the form is not there any more. I'd tried a few solutions such as putting in checks whether the user already entered data by taking the primary key after inserting the data and put into a invincible label, so when the user press back, the system can check the label whether there is any value in it. I find it a bit tedious to do so, so I decided to come here to seek some expert advice on the best practice to do this - How to Add and Update respectively and keep everything on the page no matter the user click Back and Next how many times. This is what I did on the Back button

    this.btnBack.Attributes.Add("onclick", "javascript:history.back();return false;");

    V C 2 Replies Last reply
    0
    • J J Liang

      Hi, Let me go straight to the point. I am doing a something like a wizard we use to setup some programs or system. I have 5 pages which all 5 pages is link together with 'Back' and 'Next' button. It was working fine until I tried the Back button and click Next again. I find it some what difficult to detect that the user clicked back and therefore when the user click next again, I suppose to do 'Update' and not 'Add' and also sometimes what the user typed in the form is not there any more. I'd tried a few solutions such as putting in checks whether the user already entered data by taking the primary key after inserting the data and put into a invincible label, so when the user press back, the system can check the label whether there is any value in it. I find it a bit tedious to do so, so I decided to come here to seek some expert advice on the best practice to do this - How to Add and Update respectively and keep everything on the page no matter the user click Back and Next how many times. This is what I did on the Back button

      this.btnBack.Attributes.Add("onclick", "javascript:history.back();return false;");

      V Offline
      V Offline
      Venkatesh Mookkan
      wrote on last edited by
      #2

      Is this a ASP.NET question? If so, what Framework you are using? If the Framework you are using is 2.0, then ASP.NET is providing with a nice Wizard Control which does all you need. history.back() will be effect if your page postbacks to the same page.

      Venkatesh Mookkan My: Website | Yahoo Group | Blog Spot

      1 Reply Last reply
      0
      • J J Liang

        Hi, Let me go straight to the point. I am doing a something like a wizard we use to setup some programs or system. I have 5 pages which all 5 pages is link together with 'Back' and 'Next' button. It was working fine until I tried the Back button and click Next again. I find it some what difficult to detect that the user clicked back and therefore when the user click next again, I suppose to do 'Update' and not 'Add' and also sometimes what the user typed in the form is not there any more. I'd tried a few solutions such as putting in checks whether the user already entered data by taking the primary key after inserting the data and put into a invincible label, so when the user press back, the system can check the label whether there is any value in it. I find it a bit tedious to do so, so I decided to come here to seek some expert advice on the best practice to do this - How to Add and Update respectively and keep everything on the page no matter the user click Back and Next how many times. This is what I did on the Back button

        this.btnBack.Attributes.Add("onclick", "javascript:history.back();return false;");

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        Make all the pages controls, and put them on one form, just change which one is visible.

        Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        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