Groups | Blog | Home
all groups > asp.net webcontrols > october 2004 >

asp.net webcontrols : Finding out which Control was activated


ree32 NO[at]SPAM hotmail.com
10/21/2004 7:55:25 PM
Say I have function which handles events. Suppose I have 2 calendars
where an a date is elected it activates this function.
Sub calStartSelected(ByVal sender As Object, ByVal e As EventArgs)

Is there anyway using the object sender I can findout which calendar
was selected. Say the names of the calenders are cal1 and cal2.

wessamzeidan NO[at]SPAM gmail.com
10/22/2004 2:00:32 AM
you can cast the sender to Calendar and check the ID


Dim c as Calendar=CType(sender,Calendar)
If c.ID="yourcanlenderid" Then
''do something
End IF


[quoted text, click to view]
ree32 NO[at]SPAM hotmail.com
10/24/2004 7:56:25 PM
[quoted text, click to view]

AddThis Social Bookmark Button