c# - Postback on link button when clicking to show modal box -
i try modal box update new table after onclick button. right i'm using asp:linkbutton
, when user click there sending id
server side , search through database update modal box. inside modal box i'm using asp:updatepanel
updatemode="conditional"
.
the problem is, there postback after clicking link button. guys have suggestion problem. or instead using method. please newbie guys. thanks.
1) add clientidmode = "autoid" in page. 2) register every linkbutton asyncpostbacktrigger programmatically in event listview1_itemdatabound.
protected void listview1_itemdatabound(object sender, listviewitemeventargs e) { if (e.item.itemtype == listviewitemtype.dataitem) { linkbutton btntasktitle = e.item.findcontrol("tasktitle") linkbutton; if btntasktitle != null) scriptmanager.getcurrent(this).registerasyncpostbackcontrol(btntasktitle ); } }
Comments
Post a Comment