CommandSource Property
Collapse the table of content
Expand the table of content

RepeaterCommandEventArgs.CommandSource Property


Gets the source of the command.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

Public ReadOnly Property CommandSource As Object

Property Value

Type: System.Object

The command source.

Use this property to determine the source of the command.

The following example demonstrates how to determine the command source from the CommandSource property.

Sub R1_ItemCommand(Sender As Object, e As RepeaterCommandEventArgs)
    Label2.Text = "The " & CType(e.CommandSource, Button).Text & _
       " button has just been clicked; <br>"
End Sub

.NET Framework
Available since 1.1
Return to top
© 2016 Microsoft