Controlling the controls a validator validates
Hello,
I want to control which controls appear for a validator when they go to controltovalidate dropdown in property grid. Is the solution to create a designer for the control? How do you regulate that? I can't override the ControlToValidate property...
Thanks.Brian"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
Well ur logic is true, thats the way, what u need to do is not override the property (cant), create another property, that implemen...
Validation Controls in .NET ( Client side or server side?)
i have a very basic question. We have all these validation controls in asp.net ( required field, range validator and others)..my question is the required field validator is a server side control. So does that mean that it does a post back?..is it client side or server side control
The only controls that post back are buttons and other inputs where you set AutoPostback="True", such as a dropdownlist or a textbox. Another way of posting back is using an UpdatePanel and placing a trigger in it for a specified control and/or event.
All controls are considered clien...
validation, is it better to have client side or use server side validator controls
Hi All. I want to do validation on text boxes etc. Is it better to do client side validation or just use the server side validation controls?
Hi!
If for server side controls you mean RequiredFieldValidator, CompareValidator, RegularExpressionValidator, etc.. i can tell you that they use client and server validation.
For instance if you use a RequiredFieldValidator, on the client will be a validation, but on the server this condition will be evaluated again. Probably one of the objetives of this is deal with client with javascript disabled.
Of course I ...
Client Side Validation For Custom Controls / Validators
Hi there people,
I'm creating my own set of self validating text boxes. They all inherit from a base text box which simply contains a required field validator, they then usuallly implement another validator to check they contain number, currencies, dates or whatever.
The problem i'm having is with the DateTextBox, I have created my own Date Validator which inherits from the BaseValidator class which the DateTextBox uses. My problem is that no validation is taking place on the client side. I've included the code for all related parts, if you need anymore info then please just let me k...
custom validation control client side validation did not work
<head runat="server"><script language=JavaScript >
function vrNameLenght( sender, args){
if (args.Value.Length > 15)
args.IsValid = false;
elseargs.IsValid = true;
}
</script>
</head>
<form id="form1" runat="server"> <asp:ValidationSummary ID="ValidationSummary1" runat="server" /> <table align =center width=750 &...
Part 2
Thanks to the help of this forum I solved my previous problem of adding client side validation to my date validator class. Though I found an interesting feature with it.
To give some background I'm creating selfvalidating text boxes, one for date's, another for currency etc...
Each textbox class inherits from a base textbox class which is simply a textbox with a RequiredFieldValidator bolted on. This way I can allow blanks (or not).
Now with most of my textboxes I simply inherit from my base textbox class and then add another validator - eg in my number textbox I add a RegularExpre...
Enable/Disable validation control client side
Hello - I was wondering if it possible to disable or enable a validation control through javascript alone.
Basically, I have a check box. If the user ticks it, I then require them to fill in a text box. So, ideally, I'd have a requiredFieldValidator for the test box that would only be enabled when the user clicks the text box.
Thing is - I'd rather do that without having to post back to the server to disable or enable the validation control..
Any ideas??
Thanks.http://www.developdesign.co.uk/
To disable or enable server validation control in ASP.NET using JavaScript:
Use the f...
Creating a User Control validator that validates a control on the page, rather than inside the control.
I'm trying to create a custom user control that is nothing more than a RangeValidator that validates other controls that lie on the page rather than inside the control itself... is this possible, is there a way to "bubble" it up.
Thanks,
G
My answer to your other question regarding the CompareValidator applies here. If the custom control is in the same naming container AND does not implement INamingContainer, you can create a property that lets the user assign the control to validate. Internally assign the Validator.ControlToValidate property to the value of that property.-...
validation controls
Hi all,I have a web form with a few controls and reqdfield, compare & regex validation controls. On all validation controls i have enabled the client script property. Yet when I submit the form it does a postback to do the validation. Any ideas? I am running vs2005 beta 2.TIA!
Hello.how do these validators perform the validation of the other controlos? whar browser are you using?-- Regards,Luis Abreuemail: labreu_at_gmail.comEN blog:http://msmvps.com/blogs/luisabreu
Well they are regular requiredfield, regex & compare validators. Browser is latest version of Firefox. I had to use...
Validation control not doing server side validation?
I think the subject covers what I'm asking. I want to run some checks on the data that was entered after the page was submitted, but I don't know how to handle it if there's a problem the user has to go back and fix. So I thought I'd try to work around the validation control to see how .NET handles it. I have a text field that is required. When the submit button is clicked, I assume some client side validation is run. I get the validation message I want and the form won't submit. But then I made a change in the on click event of the submit butto...
Validation of a control based on input of another control using requiredfieldvalidators
Hi
I have a form that has two checkboxes and 6 textboxes.
If the first checkbox is checked then I have to validate the first 3 textboxes. If the 2nd checkbox is checked then the other 3.
I want to perform this using required field validators.
Can anyone give me an idea on how I can do this?
Thanks in Advance
Regards
Harihar
Hi,
If you want to do this in the normal and easy flow then on the click of the check box you have to post back the page and disable the non required field validators. But I think you should go for some javascript so that you will not be required to ...
How to display all of my validation controls in my Validation summary control?
I have a validation summary control I am using on a web form to validate various controls on a web form. For one of the controls which is a text box control, I have a custom validation control. When someone presses the save button, all of the controls are validated. If any errors occur, then the error message is displayed in the validation summary area above all of the controls. This is what I want. The problem though is that I also get an error message next to my text box which was assigned the custom validator control. The problem here is that the error message i...
Validation Control question
Hello. I have a form with several validation controls checking input boxes. This form also has a DDL (dropdownlist). This form also has a formview control in insert mode - this formview control has the validation controls. The formview visibility is set to false. When a user selects an item from the DDL (which causes a postback) I set the visibilty of the formview to true. At this point the validation controls are showing errors in th evalidation summary even though the user has not attempted to do any inputs. Where or how can I control when the validation ...
Validation controls are triggereing other forms validation controls?
Can someone please look at this an explain whats going on. When you click on subscribe it triggers my registration form validation controls.
I'not sure what "subscribe" is supposed to do, but if you dont want it to cause validation, set the CausesValidation property to false.Mike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
Make sure the feild is an email address
Hey coolkidsonly, your initial posting didn't show us anything to look at. We are just guessing here without the specifics.
However, m...