ASP Caching

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mahesh

    #1

    ASP Caching

    Hello,
    I have a simple web form page in which I insert/update
    data to a database. The SQL code to insert data is
    written in a server side submit button. Every thing works
    fine. But,Whenever I insert a record (by hitting the
    submit button) and immediately refresh the page using F5
    or page refresh in IE, I see a duplicate entry entered
    into the database exactly with the same values of my
    previous insert.
    However the values for all the controls in the form are
    empty. I would really appreciate if some one can help on
    this.
    Thanks in advance.
  • Benjie Fallar

    #2
    Re: ASP Caching

    i suggest that after inserting/updating is successful, try to redirect to
    confirmation page thus to avoid refreshing the postback page.

    hope this helps.

    "Mahesh" <msmaheh@vzaven ue.net> wrote in message
    news:068301c34a 80$1b08d9a0$a30 1280a@phx.gbl.. .[color=blue]
    > Hello,
    > I have a simple web form page in which I insert/update
    > data to a database. The SQL code to insert data is
    > written in a server side submit button. Every thing works
    > fine. But,Whenever I insert a record (by hitting the
    > submit button) and immediately refresh the page using F5
    > or page refresh in IE, I see a duplicate entry entered
    > into the database exactly with the same values of my
    > previous insert.
    > However the values for all the controls in the form are
    > empty. I would really appreciate if some one can help on
    > this.
    > Thanks in advance.[/color]


    Comment

    • Benjie Fallar

      #3
      Re: ASP Caching

      i suggest that after inserting/updating is successful, try to redirect to
      confirmation page thus to avoid refreshing the postback page.

      hope this helps.

      "Mahesh" <msmaheh@vzaven ue.net> wrote in message
      news:068301c34a 80$1b08d9a0$a30 1280a@phx.gbl.. .[color=blue]
      > Hello,
      > I have a simple web form page in which I insert/update
      > data to a database. The SQL code to insert data is
      > written in a server side submit button. Every thing works
      > fine. But,Whenever I insert a record (by hitting the
      > submit button) and immediately refresh the page using F5
      > or page refresh in IE, I see a duplicate entry entered
      > into the database exactly with the same values of my
      > previous insert.
      > However the values for all the controls in the form are
      > empty. I would really appreciate if some one can help on
      > this.
      > Thanks in advance.[/color]


      Comment

      • Mahesh

        #4
        Re: ASP Caching

        Thank you for your reply.
        But the problem is doesn't happen every time. Only when I
        manually hit refresh after I hit the submit button. It is
        a data entry screen, so users wanted to stay remain in
        the screen after inserting a new record. For some reason
        if they hit refresh then the same record is likely to be
        inserterd twice or whenever they hit refresh.


        [color=blue]
        >-----Original Message-----
        >i suggest that after inserting/updating is successful,[/color]
        try to redirect to[color=blue]
        >confirmation page thus to avoid refreshing the postback[/color]
        page.[color=blue]
        >
        >hope this helps.
        >
        >"Mahesh" <msmaheh@vzaven ue.net> wrote in message
        >news:068301c34 a80$1b08d9a0$a3 01280a@phx.gbl. ..[color=green]
        >> Hello,
        >> I have a simple web form page in which I insert/update
        >> data to a database. The SQL code to insert data is
        >> written in a server side submit button. Every thing[/color][/color]
        works[color=blue][color=green]
        >> fine. But,Whenever I insert a record (by hitting the
        >> submit button) and immediately refresh the page using[/color][/color]
        F5[color=blue][color=green]
        >> or page refresh in IE, I see a duplicate entry entered
        >> into the database exactly with the same values of my
        >> previous insert.
        >> However the values for all the controls in the form are
        >> empty. I would really appreciate if some one can help[/color][/color]
        on[color=blue][color=green]
        >> this.
        >> Thanks in advance.[/color]
        >
        >
        >.
        >[/color]

        Comment

        • Mahesh

          #5
          Re: ASP Caching

          Thank you for your reply.
          But the problem is doesn't happen every time. Only when I
          manually hit refresh after I hit the submit button. It is
          a data entry screen, so users wanted to stay remain in
          the screen after inserting a new record. For some reason
          if they hit refresh then the same record is likely to be
          inserterd twice or whenever they hit refresh.


          [color=blue]
          >-----Original Message-----
          >i suggest that after inserting/updating is successful,[/color]
          try to redirect to[color=blue]
          >confirmation page thus to avoid refreshing the postback[/color]
          page.[color=blue]
          >
          >hope this helps.
          >
          >"Mahesh" <msmaheh@vzaven ue.net> wrote in message
          >news:068301c34 a80$1b08d9a0$a3 01280a@phx.gbl. ..[color=green]
          >> Hello,
          >> I have a simple web form page in which I insert/update
          >> data to a database. The SQL code to insert data is
          >> written in a server side submit button. Every thing[/color][/color]
          works[color=blue][color=green]
          >> fine. But,Whenever I insert a record (by hitting the
          >> submit button) and immediately refresh the page using[/color][/color]
          F5[color=blue][color=green]
          >> or page refresh in IE, I see a duplicate entry entered
          >> into the database exactly with the same values of my
          >> previous insert.
          >> However the values for all the controls in the form are
          >> empty. I would really appreciate if some one can help[/color][/color]
          on[color=blue][color=green]
          >> this.
          >> Thanks in advance.[/color]
          >
          >
          >.
          >[/color]

          Comment

          Working...