Hi all,
I am using datalist control to display, edit, update and delete records in c#.
Displaying works fine, but the problem is while updating the record. I am trying to access the changed value from the text box and run the update command, but everytime i try to update, it gives me the old text box value.
I have tried state value as well but doesn't help.
I don't understand wat is the problem.
Please help.
Thanks
I am using datalist control to display, edit, update and delete records in c#.
Displaying works fine, but the problem is while updating the record. I am trying to access the changed value from the text box and run the update command, but everytime i try to update, it gives me the old text box value.
I have tried state value as well but doesn't help.
Code:
TextBox tbox = (TextBox)e.Item.FindControl("TextBox1"); string newdate = tbox.Text;//This gives me the value which is already in the database but not the new value which i have entered in the text box//
Please help.
Thanks
Comment