Groups | Blog | Home
all groups > asp.net > january 2005 >

asp.net : Need help in accessing a control embedded in a repeater



redmond
1/5/2005 10:35:01 PM
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
--
Vko
1/6/2005 6:27:04 AM
in the ItemBound event :

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

[quoted text, click to view]
redmond
1/6/2005 9:23:01 AM
Thanks Vko, it works.

[quoted text, click to view]
AddThis Social Bookmark Button