1. Set the commandargument of the button in the repeater_itemdatabound event.CodeAs follows:
If (E. Item. itemtype = Listitemtype. Item | E. Item. itemtype = Listitemtype. alternatingitem)
{
Datarowview dv = (Datarowview) E. Item. dataitem;
(Linkbutton) E. Item. findcontrol ( " Editbtn " ). Commandargument = DV. Row [ " ID " ]. Tostring () + " $ " + E. Item. itemindex. tostring ();
(Linkbutton) E. Item. findcontrol ( " Delbtn " ). Commandargument = DV. Row [ " ID " ]. Tostring () + " $ " + E. Item. itemindex. tostring ();
}
2. Obtain the value in the repeater_itemcommand event. The Code is as follows:
If (E. commandname = " EDT " )
{
String [] CA = E. commandargument. tostring (). Split ( ' $ ' );
Int Itemindex = Convert. toint32 (Ca [ 1 ]);
Textbox classtitletextbox = This . Repeater1.items [itemindex]. findcontrol ( " Classtitle " ) As Textbox;
String Classtitle = Classtitletextbox. text;
}