Refer to e As RepeateritemEventArgs in another method

Hi,

I'm writing a method that has to refer to e As RepeaterItemEventArgs in a Repeater_ItemDataBound event method.

How can I do this?

Thanks,
Jens
tmccrankAsked:
Who is Participating?
 
Justin_WConnect With a Mentor Commented:
Use:
Sub R1_ItemDataBound(Sender As Object, e As RepeaterItemEventArgs)
0
 
tmccrankAuthor Commented:
It works, but I left out the Sender As Object.

In the Repeater_ItemDataBound event method I now just have RepeaterBindEvent(e).  Is there any reason to use Sender As Object?

Thanks
0
 
Justin_WCommented:
In this case, not really. For other events that have EventArgs that don't contain useful information, you would generally use sender to figure out which object/control raised the event.
0
All Courses

From novice to tech pro — start learning today.