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

  • Home
  • SEARCH
  • 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 8085257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:03:25+00:00 2026-06-05T18:03:25+00:00

I am working on a page in ASP.NET/C# where the user’s information is saved

  • 0

I am working on a page in ASP.NET/C# where the user’s information is saved to the database.
There are many fields on the page and when the validations are done then the information is saved.

The submission of information is done using an ASP.NET button.
The primary key of the table is generated in code itself, that is, every time it is increased by one.

I just faced an issue while reloading the page through the browser’s reload button. I noticed that the same user information was submitted with the primary key value incremented by one.

So my question is how should I tackle this issue?
Should I just clear values of all textboxes after successful submission of data so that it will validate and then the user has to fill the information again?

Please share your ideas as to how can I handle this.

  • 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-06-05T18:03:27+00:00Added an answer on June 5, 2026 at 6:03 pm

    The easiest thing to do use use the Post/Redirect/Get pattern, where after a postback where you have inserted the row, you redirect the user back to a page where they can view the item. This way, if they press Refresh, it will just refresh the view page.

    For example:

    protected void Button1_Click(object sender, EventArgs e) 
    {
       // Insert Data
       ...
    
       // Redirect to get
       Response.Redirect("ViewItem.aspx?id=" + insertedItemId);
    }
    

    NB: They can still press back and submit again, but this is usually confirmed by the browser before resubmitting.

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

Sidebar

Related Questions

I am working on designing a user profile web page in asp.net using c#.
hi there i am working on an asp.net web page that first lets users
I'm working on a page in an ASP.NET site where certain fields (table rows)
I am working with master page in ASP.NET (3.5) MVC Framework (1.0). I am
The ASP.net page I am currently working on has a drop down list that
I'm working on an ASP.NET page where I've got 10 entities. I'll call them
I have used JQuery within my asp.net page. JQuery is working fine. I could
I am using Asp.Net/C# .Currently I am working on the Login page,My login page
I am working on asp.net using c#. I have one master page with 3
I am working with an ASP.NET MVC application. I have one master page having

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.