Need help in accessing a control embedded in a repeater

G

Guest

I am implementing pagination using a repeater bound to an ArrayList. The
ArrayList has Prev, 1, 2, 3.. Next values.
<itemTemplate>
<asp:LinkButton id="lnkPages" value=<%(Dictionary.key)%>
item=<%(Dictionary.value)%/>
<itemTemplate>

I am trying to change style of the LinkButton which is currently active or 1
initially. I am using the ItemBound event to do this. I need help in
accessing the LinkButton in this event.
Thanks in advance.
-qwerty
 
G

Guest

in the ItemBound event :

if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatginItem)
LinkButton lnkPages = (LinkButton) e.Item.FindControl ("lnkPages");
 
G

Guest

Thanks Vko, it works.

Vko said:
in the ItemBound event :

if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatginItem)
LinkButton lnkPages = (LinkButton) e.Item.FindControl ("lnkPages");
 

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,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top