Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6599541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:30:16+00:00 2026-05-25T18:30:16+00:00

i have a little asp.net web application. it is a front end to a

  • 0

i have a little asp.net web application.

it is a front end to a sql-server-2008 database.

after they fill out all the data, they will press submit and the data will be sent to the database.

after this point if the user refreshes the page, the data is posted again!!! how do i disable this from happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:30:17+00:00Added an answer on May 25, 2026 at 6:30 pm

    This is caused by the last request being a POST request to the page, what do you need to do is a redirect so the last request becomes a GET.

    After you have handled the post data you can just do a redirect to the same page with:

    Response.Redirect("~/ThePage.aspx");
    

    This will prevent you from presenting a message to the user straight from the code behind, if you want to present a success message using this method you will need to add a querystring or something similar:

    Response.Redirect("~/ThePage.aspx?result=success");
    

    And then check on the page bind if the querystring to present a success message is set, such a check could look something like this:

    if (Request.QueryString["result"] != null && Request.QueryString["result"].ToString().ToLower() == "success")
    {
        //Show success message
    }
    

    Another solution which probably is superior but might require some more work is to wrap the form in a updatepanel, you can read more about it here: http://ajax.net-tutorials.com/controls/updatepanel-control/

    An updatepanel will make the form submit with AJAX instead of full postback.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET c# web application published to a server of ours. It
I have an ASP.NET web form application that on the server side I need
Here's the scenario: You have an ASP.Net application supported by a Microsoft SQL Server
I am very new to web application (ASP.NET). I have source code and database
I have few global methods declared in public class in my ASP.NET web application.
I have an ASP.NET 4 web application that references a SOAP web service. I
I have a small C# ASP.NET web application which generates several PNG image files
I have to write a unit test of my web application (ASP.NET - C#).
We have an ASP.Net Web Application that is running in an IIS Web-Garden--which is
I am an asp.net web application developer and I always have used Enterprise Library

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.