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. web application problem

web application problem

Scheduled Pinned Locked Moved Web Development
csharpdatabasevisual-studiosysadminhelp
5 Posts 4 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.
  • Z Offline
    Z Offline
    Zeyad Jalil
    wrote on last edited by
    #1

    hi all, i develope a web application in visual studio 2005, my problem is when i click save button(server side) to insert data into database the insertion done, but if i click F5 or (Refresh,Reload) for the page the insertion done another time( insert the data twice). how i can solve this problem? thanks to all

    L T S 3 Replies Last reply
    0
    • Z Zeyad Jalil

      hi all, i develope a web application in visual studio 2005, my problem is when i click save button(server side) to insert data into database the insertion done, but if i click F5 or (Refresh,Reload) for the page the insertion done another time( insert the data twice). how i can solve this problem? thanks to all

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You need to check whether page is postback. Put your database insertion code inside following condition.

      if(!IsPostback)
      {

      }

      HTH

      Jinal Desai - LIVE Experience is mother of sage....

      Z 1 Reply Last reply
      0
      • L Lost User

        You need to check whether page is postback. Put your database insertion code inside following condition.

        if(!IsPostback)
        {

        }

        HTH

        Jinal Desai - LIVE Experience is mother of sage....

        Z Offline
        Z Offline
        Zeyad Jalil
        wrote on last edited by
        #3

        i do that but the first time insertion in this case not done

        1 Reply Last reply
        0
        • Z Zeyad Jalil

          hi all, i develope a web application in visual studio 2005, my problem is when i click save button(server side) to insert data into database the insertion done, but if i click F5 or (Refresh,Reload) for the page the insertion done another time( insert the data twice). how i can solve this problem? thanks to all

          T Offline
          T Offline
          T M Gray
          wrote on last edited by
          #4

          Use a hidden field. Check the value of the field before you do the insert. If the field is blank, do the insert and set hidden field value to "inserted", else don't insert.

          1 Reply Last reply
          0
          • Z Zeyad Jalil

            hi all, i develope a web application in visual studio 2005, my problem is when i click save button(server side) to insert data into database the insertion done, but if i click F5 or (Refresh,Reload) for the page the insertion done another time( insert the data twice). how i can solve this problem? thanks to all

            S Offline
            S Offline
            saini arun
            wrote on last edited by
            #5

            After saving the information in database simply redirect to the current page. For instance, if your page name is insert.aspx then after saving the record write : Response.Redirect("insert.aspx"); This will prevent the page from raising postback on refresh.

            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