PC Review


Reply
Thread Tools Rate Thread

How to create event when I put linkbutton inside repeater?

 
 
smash2004@gmail.com
Guest
Posts: n/a
 
      4th Aug 2005
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

 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      4th Aug 2005
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



> 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
>




 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LinkButton inside a Repeater //OnClientClick //No more quote options sloan Microsoft ASP .NET 1 17th Aug 2007 02:01 AM
extremely slow when adding onclick event inside Repeater felixch@gmail.com Microsoft ASP .NET 0 28th Feb 2007 12:48 AM
How to create LinkButton in Repeater control from DataSet? msnews.microsoft.com Microsoft ASP .NET 2 23rd Nov 2005 03:35 AM
How to trap click event of LinkButton inside a Repeater? Michael Microsoft ASP .NET 1 7th Dec 2004 08:58 PM
Handling Radiobuttonlist event inside Repeater Control Ravi Microsoft ASP .NET 1 8th May 2004 03:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 PM.