c# - Get value from GridView -
i trying value gridview , save session variable.
i know column name , there ever 1 value in gridview. best way select , save session variable?
the column name customerid , value int.
if there 1 column , 1 row in gridview can try below.
session["mysessionvalue"]= gridview1.rows[0].cells[0].text;
but exception can thrown when access index if there no records in gridview. better check gridview1.rows.count
first , value
Comments
Post a Comment