What’s wrong with this piece of code?
onclick="javascript:myclick('<%# Container.DataItemIndex %>')"
I am trying to pass the rowNumber of a listview control to javascript function “myclick”. The above code passes all the string “<%# Container.DataItemIndex %>” as parameter (without quotes). But I want just the counter (1,2,…)
Any correction/ suggestion?
Thanks
You could use the ListView’s
ItemDataBoundevent: