Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development | Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
Author | Forum: PowerWEB LiveControls for ASP.NET Topic: Validation failing - vailda data being reported as invalid |
bb From: Belfast, United Kingdom Posts: 2 Member Since: 05/08/07 |
posted May 8, 2007 6:31 AM the follwoing is a code snippet from a page i am working on ======================= asp: <cc1:LiveTextBox ID="txtNPRValue" runat="server" Width="60" Text="0" CausesValidation="True" ></cc1:LiveTextBox> <asp:CompareValidator ID="vldNPRValue" runat="server" ControlToValidate="txtNPRValue" ErrorMessage="NPR Value must be numeric" SetFocusOnError="True" Type="Double">*</asp:CompareValidator> <cc1:LiveImageButton ID="btnContinue" runat="server" ImageAlign="Right" ImageUrl="~/images/Buttons/continue.gif" /> vb code: Protected Sub btnContinue_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnContinue.Click If Page.IsValid Then Response.Redirect("http://www.google.co.uk") End If End Sub ======================== The validation runs correctly and prevents me from continuing if text data is entered into textbox - good. However, when clicking continue button the page will rerun validation and report that the value is not numeric even when corrected to a true numeric value. This error only occurs if the validator si caused to report error - i.e. if page is ran and textbox value not modified, continue follows through ok. Anyone any ideas as to what i may be missing? (Using VS2005 SP2 and ASP 2.0) |
bb From: Belfast, United Kingdom Posts: 2 Member Since: 05/08/07 |
posted May 8, 2007 6:34 AM note: this fails even when using a standard asp:imageButtoon control |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted May 8, 2007 1:58 PM Hi, A couple of comments. First, instead of using Response.Redirect, use the technique described here: http://support.dart.com/postings?topicid=5774 Second, I am not seeing the behavior you describe. For me, the second validation works. However, unfortunately I see an even worse problem - the button's event does not fire when the Validator is on the webform. This is a known problem that has been reported as issue #4258. For an update on the status of this issue, please contact Jamie Powell (jamie.powell@dart.com). -ken |
Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
This site is powered by
![]() |