Home > Asp Net > Asp Net Comparevalidator Not Working

Asp Net Comparevalidator Not Working

asked 6 years ago viewed 1614 times active 6 years ago Upcoming Events 2016 Community Moderator Election ends Nov 22 Related 1ASP.NET CompareValidator compare against sub control1ASP CompareValidator and NOT submitting for how to use validation summary control please see below link http://chikkanti.wordpress.com/2012/05/23/the-validationsummary-server-control-in-asp-net/ Reply Sujeet Saste Contributor 2030 Points 574 Posts Re: CompareValidator problem? I have used the CompareValidator and have set the properties to: ControlToCompare: textboxB ControlToValidate: textboxA Operator: GreaterThan / Also tried LessThan Type: Date Here is the problem: When I provide a Reply kaushik_tatv...

It has many text box and validator controls, and one compare validator just isn't working. I got stuck here....I will be very thankful to you. Ray Decker replied May 13, 2011 What you need Dim mi As DateInterval Dim testdate As Date if DATEDIFF ( mi.Minute , testdate ) , now ) > 0 then > It can compare two values, for instance the values of two controls. http://stackoverflow.com/questions/4134602/asp-net-comparevalidator-not-running-as-expected-on-submit

Privacy Statement| Terms of Use| Contact Us| Advertise With Us| CMS by Umbraco| Hosted on Microsoft Azure Feedback on ASP.NET| File Bugs| Support Lifecycle Blog Sign in Join ASP.NET Home Get Contributor 2010 Points 523 Posts Re: CompareValidator problem? How does Gandalf end up on the roof of Isengard? It is possible to mess up the validation in the PageLoad event by assigning default values to controls.

Email :
Let me know whether it is working or not. Pick Randomly Between -1 or 1 How do unlimited vacation days work? Without further imformation it is hard to diagnose the exact problem, so I'll provide some general advice. Dynamically Select Template based on template id field passed in DE How do I deal with my current employer not respecting my decision to leave?

It also important to note that Validation comes after Load and before Postback event handling. it is always recommended to Validate also on serverside because javascript could be deactivated. –Tim Schmelter Nov 9 '10 at 14:22 add a comment| 2 Answers 2 active oldest votes up The ASP.net page life cycle can take some getting used to. http://stackoverflow.com/questions/1476161/comparevalidator-not-working-correctly Now, try running the website, and test the two new fields.

Similar Threads Ivoking comparevalidator Sjaakie Helderhorst, Feb 25, 2004, in forum: ASP .Net Replies: 0 Views: 436 Sjaakie Helderhorst Feb 25, 2004 Dynamicly change ValueToCompare on a CompareValidator Henke, Feb 26, C# <--> VB.Net |jQuery Widgets Reply mamoorkhan Member 24 Points 59 Posts Re: CompareValidator problem? How do you simplify a log with an exponent in the base? Member Login Remember Me Forgot your password?

Solve problems - It's Free Create your account in seconds E-mail address is taken If this is your account,sign in here Email address Username Between 5 and 30 characters. Feb 15, 2013 04:03 AM|mamoorkhan|LINK Hamil test this it work

*

Here is how I would do it: //Page Load event protected void Page_Load(object sender, EventArgs e) { if(!Page.IsPostback) { //Set Control inital page load values etc in here } } private C# <--> VB.Net |jQuery Widgets Reply clumsyhamste... Home | Invite Peers | More Visual Basic Groups Your account is ready. Help! >> >>Matt > > > Good thought, but all the other validators on the page fire (plus I double-checked).

US Election results 2016: What went wrong with prediction models? I will be very thankful to you. We all have to start somewhere. I'm new to C# and still learning.

Any other ideas? Thank you! I have two textboxes and I need to make sure than textboxA is LessThan textboxB.

to compare...but its also failed.

What is the point of update independent rendering in a game loop? u can set Display Property of Validator to None and use validation Summary control to display error when u click on submit button.... My compare is to prevent the same password from being used in both so I do this.

It has many text >>box and validator controls, and one compare validator just isn't working. >>I have the control to validate set, and control to compare set, and the >>page just Thanks you very much for your help!!!I'm really happy for your quickly answer. I have the control to validate set, and control to compare set, and the page just behaves like the validator isn't there. How disable required validation based on a parameter?

I am using the following code I am getting: The value '<%= DateTime.Today.ToShortString() %>' of the ValueToCompare property i replaced this with ValueToCompare="<%# DateTime.Today.ToShortDateString() %>" but still not working Also I tried for the another text box which is invisible and bind with the current date. Newer Than: Search this thread only Search this forum only Display results as threads Useful Searches Recent Posts More...