From: Ujjaval S. <uj...@gm...> - 2006-05-31 02:59:16
|
I've a databound Anthem DataList and a panel with other textbox control in the user control. The DataList EditItemTemplate contains one ASP textbox and a linkbutton and a validation control for the textbox. <asp:RegularExpressionValidator ID="DataListCAVValidator" runat="server" CssClass="aspText" ControlToValidate="txtCAV" Display="dynamic" ValidationExpression="^\d$" ValidationGroup="DataListSiteGroup" ErrorMessage="Enter valid value" EnableClientScript="false"></asp:RegularExpressionValidator> And I've specified in the linkbutton of the datalist <asp:LinkButton ID="btnSave" runat="server" CssClass="linkButtonStyle" ValidationGroup="DataListTumourSiteGroup" CausesValidation="true" Text="Save" CommandName="update" /> This does not seem to work on aspx page. What it does is, if I enter any text characters and press Save, it clears the textbox , but does not display error message. Whats going wrong here?? On the same user control, I am having another Anthem panel with asp textbox control and anthem button control. for the textbox control, I've following validation control, <asp:RegularExpressionValidator ID="CAVValidator" runat="server" CssClass="aspText" ControlToValidate="txtCAVnew" Display="dynamic" ValidationExpression="^\d$" ValidationGroup="newTumourSiteGroup" ErrorMessage="Enter valid value" EnableClientScript="false"></asp:RegularExpressionValidator> And the button is declared as <anthem:Button ID="btnSave" runat="server" CssClass="aspText" Text="Save" ValidationGroup="newTumourSiteGroup" OnClick="btnSave_Clicked" /> This seems to work without any problem. So, anybody has any idea, why this works in Anthem panel and not in DataList mentioned above?? Thanks, Ujjaval -- Ujjaval Suthar Mobile : +61 - 0431 152 757 |