I am currently working on a project where I want to allow a customer to update their details through a web interface. I am using C# codebehind. On page load I am setting the values of the textbox using the existing customers details.
The idea being, the user sees the textbox with the existing details and can make changes and click submit.
On the submit button click I have C# code which I am attempting to retrieve the changed value from the textbox control. However the textbox control seems not to have updated itself, as the value (from the textbox control) is still the existing value.
This is the code I am using on the button click event.
patient.Firstname = txtFirstname.Text.Trim();
Any help and pointers would be much appreciated.