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 6105241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:57:20+00:00 2026-05-23T13:57:20+00:00

I have a ASP.NET code, I use it to insert and view my data

  • 0

I have a ASP.NET code, I use it to insert and view my data from a *.mdb file.
When I reload the browser reload, it insert the same old data.

    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataKeyNames="user_id" DataSourceID="AccessDataSource1" Height="50px" 
        Width="125px" DefaultMode="Insert">
        <Fields>
            <asp:BoundField DataField="user_id" HeaderText="user_id" InsertVisible="False" 
                ReadOnly="True" SortExpression="user_id" />
            <asp:BoundField DataField="user_name" HeaderText="user_name" 
                SortExpression="user_name" />
            <asp:BoundField DataField="user_pass" HeaderText="user_pass" 
                SortExpression="user_pass" />
            <asp:BoundField DataField="user_email" HeaderText="user_email" 
                SortExpression="user_email" />
            <asp:CommandField ButtonType="Button" ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>

    <div ID="Div1" runat="server"></div>


    <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
        DataFile="~/App_Data/esn.mdb" 
        SelectCommand="SELECT * FROM [user]"
        InsertCommand="INSERT INTO [user] ([user_name], [user_pass], [user_email]) VALUES (@user_name, @user_pass, @user_email)">
        <InsertParameters>
            <asp:Parameter Name="user_name" Type="String" />
            <asp:Parameter Name="user_pass" Type="String" />
            <asp:Parameter Name="user_email" Type="String" />
        </InsertParameters>
    </asp:AccessDataSource>





    <asp:GridView ID="GridView1" runat="server" 
        AutoGenerateColumns="False" DataKeyNames="user_id" 
        DataSourceID="AccessDataSource1">
        <Columns>
            <asp:BoundField DataField="user_id" HeaderText="user_id" InsertVisible="False" 
                ReadOnly="True" SortExpression="user_id" />
            <asp:BoundField DataField="user_name" HeaderText="user_name" 
                SortExpression="user_name" />
            <asp:BoundField DataField="user_pass" HeaderText="user_pass" 
                SortExpression="user_pass" />
            <asp:BoundField DataField="user_email" HeaderText="user_email" 
                SortExpression="user_email" />
        </Columns>
    </asp:GridView>

</form>
  • 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-23T13:57:20+00:00Added an answer on May 23, 2026 at 1:57 pm

    I think sendig user to a success insert page is an option!

    Try look here:

    detect duplicate insert

    or here:

    ASP.Net – Prevent Duplicate(Double) Inserts when Page is refreshed

    How to Prevent Duplicate Record Insertion on Refresh Click in Browser in ASP.Net ?

    Here a Microsoft article:

    Trap the Browser Refresh

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

Sidebar

Related Questions

I've just updated my ASP.Net code from HttpContext.RewritePath(targetPath) to use the .Net 3.5 function:
I have ASP.Net code similar to the following (this is inside a FIELDSET): <ol>
I have ASP.Net code generating my button's HTML for me using divs to get
I have some C# / asp.net code I inherited which has a textbox which
We have some legacy ASP.NET code that detects if a request is secure, and
I have an ASP.NET page with code-behind in VB.NET. On the ASPX page I
I have a line of C# in my ASP.NET code behind that looks like
I'm using an Ajax update panel and have recently added ASP.NET tracing code to
I have an ASP.NET MVC server app and client code which uses jquery. I'd
I have an asp.net web page with a ton of code that is handled

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.