"MaryA" ने लिखा:
I have an asp.net application in which i have a form containing a datagrid
when using the update command event i have:
tb = CType(e.Item.Cells(3).Controls(0), TextBox)
subject = tb.Text
this code is supposed to get the new data entered in the text box but i am
getting the old data why?
In this case, use FindControl method Instead of tb =
CType(e.Item.Cells(3).Controls(0), TextBox)
like this
Dim txt as textbox = CType(e.item.FindControl("Id of textbox"),textbox)
I hope this will work in all cases. if you are loop through the datagrid
then its best way to do for each row.