2012-02-21 3 views

답변

0

버튼 CommandName 속성을 설정하여 DataListItemCommand 이벤트를 처리한다고 가정합니다.

Sub Item_Command(sender As Object, e As DataListCommandEventArgs)Handles DataList1.ItemCommand 

    ' What command was triggered? 
    If e.CommandName = "YourCommandName" Then 

     ' Get the Label in the DataListItem of the clicked button 
     Dim lbl = DirectCast(e.Item.FindControl("Label1"), Label) 
     Dim labelText = lbl.Text 
    End If 

End Sub 
관련 문제