G
Guest
I am having a problem accessing changed values in TextBoxes returned via the OnUpdaterow event. Using C# I access the control using: string _txtAmt = ((TextBox)e.Item.FindControl("txtAmount")).Text
Upon inspection of _txtAmt, the old (pre-edited) value of the textbox is returned versus the changed (edited) value. Using the FindControl method should work, right? I see a lot of examples using an indexer into the e.Item.Cells[n].Controls[n] to retrieve the control but couldn't figure out which indexer was correct to reference the textbox. If I used the 0th element, I received a literal control rather than the textbox and couldn't cast it into what I needed to read the value.
Would appreciate any help
EddieG
Upon inspection of _txtAmt, the old (pre-edited) value of the textbox is returned versus the changed (edited) value. Using the FindControl method should work, right? I see a lot of examples using an indexer into the e.Item.Cells[n].Controls[n] to retrieve the control but couldn't figure out which indexer was correct to reference the textbox. If I used the 0th element, I received a literal control rather than the textbox and couldn't cast it into what I needed to read the value.
Would appreciate any help
EddieG