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

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -