[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

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
0
tmccrank
Asked:
tmccrank
  • 2
1 Solution
 
Justin_WCommented:
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now