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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:33:27+00:00 2026-05-15T12:33:27+00:00

I have an asp web form which is used for database entry located at

  • 0

I have an asp web form which is used for database entry located at

localhost/EnterNewData.aspx

I also want to use this form to view entries in the database by passing the database id

localhost/EnterNewData.aspx?id=12

This all works fine. What I want to do now is if I am viewing an entry and one of the fields is incorrect, I can change it in the form and click the submit button and update the entry. The code checks if an id has been passed and if it has then it does an SQL update instead of an insert, however, none of the data seems to be getting updated. It’s not a database issue as I have stepped through the code and have found the error here:

protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string name = HttpUtility.HtmlEncode(txtBxName.Text);

The value txtBxName.Text still holds the original text that was in the web form field when the page was loaded, not the new text that I have typed in there before pressing the submit button.

Any ideas would be extremely helpful.

Thanks

G

  • 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-15T12:33:28+00:00Added an answer on May 15, 2026 at 12:33 pm

    Can we see your Page_Load event? It might be a case of specifying the following IF statement when pre-populating the values:

    if (!Page.IsPostBack) {
        //Pre-fill textboxes here
    }
    
    • 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 web form on which I'm displaying a list of database
I have a asp.net web form which will submit information to come as emails.
In my ASP.NET Web-form Project I have an Event which Export Data ( List<Profit>
I have a huge ASPX web form which has around 100 fields which need
I have a web form in a .aspx form which takes a users details
Here's the problem I'm having in my ASP.NET web-form project. I have Datalist which
I have a GridView on ASP.NET web form which I have bound to a
I have a simple ASP.NET web form on a page, which is contained in
I have an ASP.NET web form which I am adding a variable number User
I have an ASP.NET webform on which I use a DropDownList control to allow

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.