I have one gridview. The grid view does not update the text box value -- whenever I click update, it takes my old text box value only.
This is my C# code:
TextBox txtqty = (TextBox)productGridView.Rows[e.RowIndex].Cells[0].FindControl("txtQty");
int qty = Convert.ToInt32(txtqty.Text.Trim());
If anyone could provide some assistance, I would appreciate it.
the following code will give you the text of the textbox...
string st=convert.toint32(((textbox)(productgridview.rows[e.rowindex].findcontrol("txtQty"))).text);
the above code will definitely work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.