473,809 Members | 2,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create event when I put linkbutton inside repeater?

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

Nov 19 '05 #1
1 2172
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


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1038
by: Barry | last post by:
Hi, I have a Repeater in which the first field has a linkbutton. I also have a button outside the repeater. When a user clicks the linkbutton, I want it to fire every linkbutton's click event within the repeater (so it will expand the next level of a drill-down). I'm stuck on how to fire this event. If I call the ItemCommand event handler, where do I get the arguments? TIA, Barry
0
3965
by: Patrik Persson | last post by:
Hello all I have got a problem with a nested repeater and the ItemCommand Event. I am adding handler for the ItemCommand and ItemBound. The ItemBound works perfect but I cant seem to get the linkbuttons to work with ItemCommand in the inner repeater. Can someone please help me? The following code (almost) is my problem! ASP CODE
1
1493
by: Michael | last post by:
How to trap click event of LinkButton inside a Repeater? I'm using C#. Thanks.
0
1020
by: Antonio Carpentieri | last post by:
Hi all, in a aspx page I have a repeater like this: <asp:repeater id=repeaterResults runat="server" OnItemCommand="RepeaterResult_Event"> <HeaderTemplate> <table width="515" border="0" cellpadding="3" cellspacing="0"> </HeaderTemplate> <FooterTemplate> </table> </FooterTemplate>
4
1954
by: Antonio Carpentieri | last post by:
Hi all, in my previous post I've wrong typed some tems.. this is the corrected post. in a aspx page I have a repeater like this: <asp:repeater id=repeaterResults runat="server" OnItemCommand="RepeaterResult_Event"> <HeaderTemplate> <table width="515" border="0" cellpadding="3" cellspacing="0"> </HeaderTemplate> <FooterTemplate>
2
10783
by: msnews.microsoft.com | last post by:
I want to read information out of a database at runtime (names of files available to download) and create a list of linkbuttons that the user can click on to download the file(s). How can I accomplish this. I've got this far: In the html: .... table>
0
2962
by: Demetri | last post by:
I have created a web control that can be rendered as either a linkbutton or a button. It is a ConfirmButton control that allows a developer to force a user to confirm if they intended to click it such as when they do a delete. Everything is great. By and large it will be used in my repeater controls using the command event when the user clicks on it and so that event is working great. My issue is the Click event. When the control is...
0
1576
by: felixch | last post by:
Hi all, I tried to add an OnClick event to a LinkButton by using Attribute.sAdd, which resides in a Repeater and the Repeater is bind with a DataTable with around 2000 records. If I try to run the page in debug mode it takes more than 1 mins to load and consumes alot of memory. If I remove the line: h.Attributes.Add("OnClick",test()), it only takes a few seconds to load. Furthurmore, If I run the page without debug mode, it also takes a...
2
4675
by: Nathan Sokalski | last post by:
I have an ImageButton inside a Repeater control. However, the ImageButton does not trigger the Repeater's ItemCommand event. For the moment, I am nesting an Image control inside a LinkButton, which works, but requires more work and 2 controls. I believe the reason for this is that the ImageButton renders an <input type="image"/while the LinkButton renders an <a></a> tag. Any ideas? -- Nathan Sokalski njsokalski@hotmail.com...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10378
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7653
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.