Skip to content Skip to sidebar Skip to footer

Passing Repeater Container.ItemIndex To A Javascript Function

In C# Asp.Net I need to pass my repeater occurrence index into a Javascript function when OnClientClick is depressed from an ASP button. Here is my code

Instead of

OnClientClick="return getNewQuote(<%# Container.ItemIndex %>)

Solution 2:

If we want to use in vb.net

OnClientClick='<%# "return getNewQuote(" & Container.ItemIndex & ")" %>'

otherwise it will give exception string is not in correct format


Post a Comment for "Passing Repeater Container.ItemIndex To A Javascript Function"