Hi i have this validation
<asp:TextBox runat="server" ID="txbcantidad" CssClass="borde_txb" Width="45"></asp:TextBox>
<asp:RegularExpressionValidator
EnableClientScript="true"
SetFocusOnError="true"
ID="Regtxbcantidad"
Display="None"
ValidationGroup="valaccion_paso3_tab2"
runat="server"
ControlToValidate="txbcantidad"
ErrorMessage="Debe digitar números en el campo, sin caractéres especiales ni letras." ValidationExpression="^[0-9]*$">
</asp:RegularExpressionValidator>
<cc1:ValidatorCallOutExtender
CssClass="valtooltip"
PopupPosition="TopLeft"
WarningIconImageUrl="~/admin/img_alcalist/ico_alerta_val.gif"
CloseImageUrl="~/admin/img_alcalist/ico_cerrar_val.gif"
ID="Valtxbcantidad"
runat="server"
TargetControlID="Regtxbcantidad"
HighlightCssClass="campofallido" />
the textbox txbcantidad is in radgrid, this is the radbutton that activate the validation
<telerik:RadButton ID="btnaccion2_paso3_tab2" runat="server" Skin="Office2010Blue" CssClass="txt11000" Text="Guardar Cambios" ValidationGroup="valaccion_paso3_tab2" CommandArgument="guardarref" OnCommand="realizaraccion"></telerik:RadButton>
my problem is that even if validation is enabled in the click event, the button causes postback and gets an error.
normal in this situation is that if the validation is enabled the button doesn't postback, how i fix this?
note that this controls are in a file ".ascx", which is called in a page ".aspx" that have one update panel. maybe this helps.
thanks.
<asp:TextBox runat="server" ID="txbcantidad" CssClass="borde_txb" Width="45"></asp:TextBox>
<asp:RegularExpressionValidator
EnableClientScript="true"
SetFocusOnError="true"
ID="Regtxbcantidad"
Display="None"
ValidationGroup="valaccion_paso3_tab2"
runat="server"
ControlToValidate="txbcantidad"
ErrorMessage="Debe digitar números en el campo, sin caractéres especiales ni letras." ValidationExpression="^[0-9]*$">
</asp:RegularExpressionValidator>
<cc1:ValidatorCallOutExtender
CssClass="valtooltip"
PopupPosition="TopLeft"
WarningIconImageUrl="~/admin/img_alcalist/ico_alerta_val.gif"
CloseImageUrl="~/admin/img_alcalist/ico_cerrar_val.gif"
ID="Valtxbcantidad"
runat="server"
TargetControlID="Regtxbcantidad"
HighlightCssClass="campofallido" />
the textbox txbcantidad is in radgrid, this is the radbutton that activate the validation
<telerik:RadButton ID="btnaccion2_paso3_tab2" runat="server" Skin="Office2010Blue" CssClass="txt11000" Text="Guardar Cambios" ValidationGroup="valaccion_paso3_tab2" CommandArgument="guardarref" OnCommand="realizaraccion"></telerik:RadButton>
my problem is that even if validation is enabled in the click event, the button causes postback and gets an error.
normal in this situation is that if the validation is enabled the button doesn't postback, how i fix this?
note that this controls are in a file ".ascx", which is called in a page ".aspx" that have one update panel. maybe this helps.
thanks.