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 <asp:Button ID="btnGetNewQuote" Text="Get New Quote" class="pcbutton" runat="server" OnCommand="GetNewQuote" CommandArgument ='<%# Container.ItemIndex %>' OnClientClick="return getNewQuote(<%# Container.ItemIndex %>) /> If I hard code ....OnClientClick="return getNewQuote(0)"> it works and the JS gets invoked, but as soon as I put the #