types - Get value of CheckBox in GridView, Bit Datatype, asp.net -
- i beginner , question or syntax may silly.
- i have drawn grid view having based on sqldatasource query.
- converted status field bit.
- a checkbox automatically created.
now how can value of checkbox on selectedindexchanged.
protected void gridview1_selectedindexchanged(object sender, eventargs e) { panel_entry.visible = true; int = gridview1.selectedindex; string vdescr = gridview1.rows[i].cells[2].text; checkbox chk = (checkbox)gridview1.rows[i].findcontrol("bitstatus"); response.write(chk.tostring()+vdescr);}
system.nullreferenceexception: object reference not set instance of object.
error shown. please in regard.
when add control dynamically , should load control again , not list in control tree.for finding can use loop find said in post better way find control in asp.net
also @ post too: seems useful asp.net findcontrol not working - how come?
Comments
Post a Comment