开发者

Can i bind an the datasource Index in a repeater/grid

开发者 https://www.devze.com 2022-12-31 20:34 出处:网络
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.

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 syn开发者_如何学Pythontax is completely wrong but hopefully you get the idea.. thanks!


Like this:

<%# Container.ItemIndex %>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号