How to create event when I put linkbutton inside repeater?

  • Thread starter Thread starter smash2004
  • Start date Start date
S

smash2004

I have VS 2005 CTP.

I created a page with one repeater. Inside i put a linkbutton.

Usually when i put linkbutton on a page I doubleclick it in designview
and event gets created in codebehind file. Now i can't click on
anything because my linkbutton is not visible in the designer.

So i moved my linkbutton outside the repeater and doubleclicked it and
code gets created. With code created I moved my linkbutton again inside
the repeater. I run the project by it failed. It writes:

Handles clause requires a WithEvents variable defined in the containing
type or one of its base types

In VS2003 i could wrote the "withevent" stuff myself, but here
everything is automatic so i don't know how to solve this problem.

If anyone has an idea, i'll appreciated. Thx
 
WHat do you want to happen when the user clicks the LinkButton? Does it depend
upon what row is clicked in the repeater? If so, you should look into handling
the Repeater's ItemCommand event instead.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
Back
Top