views:

55

answers:

1

Hi All,

I have a repeater.. and in my repeater i have a link that fires some JS.

I would like to pass the itemIndex of the datasource in the JS.

Is there some way to do this without using OnItemBound or OnItemCreated??

like..

<a href="#" onclick="dosomestuff(<%# this.item.index %>); return false;">Add Stuff</a>

i know the syntax is completely wrong but hopefully you get the idea.. thanks!

+2  A: 

Like this:

<%# Container.ItemIndex %>
SLaks
How awesome is that? Thanks SLaks!
bill