473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

LinkButtons within Repeater control

I have created a repeater with a linkbutton for each databound item.

When I fire off the repeater controls ItemCommand event I execute the
following...

For indx = 0 To rpContacts.Items.Count - 1
Dim btnMyContact As LinkButton =
CType(rpContacts.Items(indx).FindControl("btnConta ct"), LinkButton)
....

NEXT

This works and I can access all of the properties of the linkbutton

What I need to do is determine which linkbutton was clicked and then fire
off a click event for that button.

any suggestions?

Gary T.

Nov 18 '05 #1
1 1156
The LinkButton can raise a Click event, in which case the sender
parameter is a reference to the LinkButton, you'll just need to
coherce it to the proper type.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 11 Nov 2004 10:09:01 -0800, "Majek"
<Ma***@discussions.microsoft.com> wrote:
I have created a repeater with a linkbutton for each databound item.

When I fire off the repeater controls ItemCommand event I execute the
following...

For indx = 0 To rpContacts.Items.Count - 1
Dim btnMyContact As LinkButton =
CType(rpContacts.Items(indx).FindControl("btnCont act"), LinkButton)
...

NEXT

This works and I can access all of the properties of the linkbutton

What I need to do is determine which linkbutton was clicked and then fire
off a click event for that button.

any suggestions?

Gary T.


Nov 18 '05 #2

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

Similar topics

0
by: mike | last post by:
How do i perform a databind on a web user control within a repeater or rather how can I access the datasource that is already bound? I have a web user control that displays a table of values (the...
0
by: dgk | last post by:
I'm adapting some code that wrote out html pages to work in dotnet and be dynamic rather than static. Currently, a page is presented with a table containing quite a few rows and columns. One of...
9
by: Jaybuffet | last post by:
my aspx has something like this <asp:Repeater id="Repeater1" runat="server"> <ItemTemplate> <mycontrol:ctl id="ctlId" obj='<%# Container.DataItem %>' showItem="true"/> </ItemTemplate>...
2
by: AC [MVP MOSS] | last post by:
I have a repeater with a header, footer, and item template. The item template is the only one with server controls (hyperlinks, labels, and a nested repeater). Within the top repeater, I'm handling...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...

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.