How to create event when I put linkbutton inside repeater?

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
 
B

Brock Allen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top