the function in OnItemCommand of the asp:Repeater is not working randomly. It's a normal one coded like this.
<asp:Repeater runat="server" ID="control01" OnItemCommand="control01_OnItemCommand"> <ItemTemplate> <li><asp:LinkButton runat="server" ID="btn_button" CommandArgument='1'>Click</asp:LinkButton></li> </ItemTemplate> </asp:Repeater> After some time spent on debug I found it's related a input text box on page.
<asp:TextBox ID="txt_input" runat="server"></asp:TextBox>
Only if it's correct value (validated) the function works well.
If I remove <asp:RequiredFieldValidator> and <asp:RequiredFieldValidator> on the text box here
<asp:RegularExpressionValidator ID="rvDecimal" ControlToValidate="txt_input" runat="server" ErrorMessage="Please enter a valid value" ValidationExpression="^(-)?\d+(\.\d\d)?$"></asp:RegularExpressionValidator> <asp:RequiredFieldValidator ID="rfd_input" runat="server" ControlToValidate="txt_input" Text="Please enter a valid value"></asp:RequiredFieldValidator> OnItemCommand got fired and the function works well.
The question is, how can I keep the validation and make the function in OnItemCommand working?
ValidatorEnable($get(CONTROL_ID), true);supposed to be? Can you at least post the rest of the relevant code?ValidatorEnable($get(CONTROL_ID), true);part clarified which looks like js code. have you checked for JS errors? If there are js errors the page might not postback...ValidatorEnablein jQuery is irrelevant so I just removed it.