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 
関連する問題