So, I want to use jquery to set the text of a button, depending on the value of a property in the current row of a repeater.
I need to call a function in the code-behind to map the value to the text the button should have. So, I need to pass to my foo function, the string value of the UserStatus property for the current item in the repeater.
I want to do the following, although this syntax is obviously not correct:
<asp:Repeater ID="dgCustomer" runat="server">
<ItemTemplate>
<input id="rb" name="rb" type="radio" onclick='javascript:$("input.magicbutton").val("<%= foo(DataBinder.Eval(Container.DataItem, "UserStatus")) %>");'
If the codebehind contains the following method definition:
protected string foo(string status)
What is the correct syntax to call foo with an Item value from the repeater?