Ok, here is the skinny. I have a textbox on a webform (asp.net 2.0) that has it's text property set on load to data from a sqldatareader (I read the data into a string variable, then sent the text property equal to the string variable). This is working well, except for one problem, I want to be able to type over the data in that text box, and when I hit a submit button on the form, update the data in the database that was originally set at runtime (using a sqlcommand object and a stored procedure).
Basically this:
1)Form opens, text box has data in it from database (i.e. "Test")
2)I delete "Test" text from text box, and type in "Test2"
3)I hit the submit button, and through a sqlcommand object update the data on the database from "Test" to "Test2"
That is how I want it to work, but no matter what I try, all I get is the original data that got populated in the text box on load. If any of that made sense, could someone please help me figure out why the data won't update when I pre-populate it from the database? It works fine if I don't pre-populate first...
Basically this:
1)Form opens, text box has data in it from database (i.e. "Test")
2)I delete "Test" text from text box, and type in "Test2"
3)I hit the submit button, and through a sqlcommand object update the data on the database from "Test" to "Test2"
That is how I want it to work, but no matter what I try, all I get is the original data that got populated in the text box on load. If any of that made sense, could someone please help me figure out why the data won't update when I pre-populate it from the database? It works fine if I don't pre-populate first...