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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:38:12+00:00 2026-05-26T13:38:12+00:00

i have an asp.net webform where the user can enter data and submit into

  • 0

i have an asp.net webform where the user can enter data and submit into a database table on sql-server-2008

  1. the user picks the primary key of the record he wants to edit by going to the URL http://someurl/default.aspx?primarykey=123
  2. based on the primary key the webform is succesfully filled out
  3. the user can make changes to any data and resubmit it to be updated in the database for that specific PK

here is how i grab data from the userform:

    public LOMDLL.Main_Lom_Form PopulateMainForm()
    {
        //populate class
        LOMDLL.Main_Lom_Form TheForm = new LOMDLL.Main_Lom_Form();

        try
        {
            TheForm.received_date = received_dateTextbox.Text.ToDateTime();
            TheForm.site_of_occurrence = site_of_occurrenceTextBox.Text.ToUpper();
            TheForm.occurrence_date = occurrence_dateTextBox.Text.ToDateTime();
            TheForm.report_by = report_byTextBox.Text;


            if (RadioButtonList1.SelectedValue != "Other:")
                TheForm.identified_by = RadioButtonList1.SelectedValue;
            else
                TheForm.identified_by = "Other: " + otherTextBox.Text;


            TheForm.practice_code = txtPracticeCode.Text.ToUpper();
            TheForm.comments = txtComments.Text;
            TheForm.report_date = report_dateTextBox.Text.ToDateTime();
            //TheForm.windows_user = WindowsIdentity.GetCurrent().Name;
            TheForm.windows_user = HttpContext.Current.User.Identity.Name.ToString();
            TheForm.computer_name = System.Environment.MachineName;
            TheForm.time_stamp = DateTime.Now;
        }
        catch (Exception e)
        {

        }

        return TheForm;
    }

it is returning OLD data. it returns what was in the fields BEFORE the user updated the data in the textboxes.

another words when i debug, and i look at the values that are being stored in the textboxes they DO NOT reflect the changes made by the user. the values are the same as they are currently in the database before the update!

what am i doing wrong?

is there some kind of disconnect between client and server?

  • 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-26T13:38:13+00:00Added an answer on May 26, 2026 at 1:38 pm

    I would check your bindings when you load the page. Chances are you are re-binding your page from your database before you try to read the changed values.

    Check your Page_Load and make sure you are only binding your page with database information when !Page.IsPostBack and not every time you load your page.

    • 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 webform. the users enter data into the textboxes and i
I have an ASP.net gridview on a webform where user's can select a row.
I have dragged a empty asp.net table onto my webform. I generate all the
I have an ASP.NET web form which I am adding a variable number User
I have a ASP.NET webform that, aside from other controls, has a textbox for
I have an ASP.NET webform on which I use a DropDownList control to allow
I have a asp.net webform with a button. The OnClientClick event is wired to
I have an ASP.NET Webform and inside the form I have an input type
We have a pretty big ASP.NET WebForm (web application) project with a lot of
On my C# asp.net webform I have a search page that has roughly 20

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.