title: Page upload data again on page refresh in ASP.NET
body: <p>For some reason when the user click on the submit button and he re-fresh the page the same data get's uploaded again to my SQL Server 2005 database. I do not what this to happen........... Why is this happening? I am making use of a SQL Data Source!!</p>
  
  <p>My code</p>
  
  <pre><code> Try
  
          'See if user typed the correct code.
          If Me.txtSecurity.Text = Session("Captcha") Then
  
              If Session("NotifyMe") = "Yes" Then
                  SendEmailNS()
              End If
  
              RaterRate.Insert()
              RaterRate.Update()
  
              DisableItems()
  
              lblResultNS.Text = "Thank you for leaving a comment"
  
              LoadCompanyList()
              LoadRateRecords()
  
              txtCommentNS.Text = ""
              txtSecurity.Text = ""
              lblResultNS.Focus()
  
          Else
  
              Session("Captcha") = GenerateCAPTCHACode()
              txtSecurity.Text = ""
              txtSecurity.Focus()
              Validator10.Validate()
  
          End If
  
  
      Catch ex As Exception
  
          lblResultNS.Visible = True     
          lblResultNS.Text = ex.Message.ToString
          lblResultNS.Focus()
  
      End Try
  </code></pre>