Validation Controls in ASP.NET
Hello all,
In one of the interviews that i gave recently, I was asked about how many types of validation controls exist in ASP.NET? I gave the answer as [B]6[/B]
The next question asked was.. [I][B]what is the advantage of using Validation Controls instead of normal coding?[/B][/I] I gave the answer : [B]because it reduces time[/B]. She was not very convinced with this answer. Guys do you have any other answers for this question??
Thanks in advance to all who answer.
Rgds,
Sameer
Re: Validation Controls in ASP.NET
Hi Sameer,
[B]Advantages of using Validation controls[/B]
1. Validation controls automatically uses Client-side validation for IE 4.0 or later
2. Each of the validation controls is having so many properties that can be set as per your need. Better customization instead of manual coding.
There could be some more advantages, but these two are main differences.
---V V---
Vikas Vaidya
[I]Please mark this post as Thank if u found the answer useful[/I]
Re: Validation Controls in ASP.NET
Yes dear , your answer was correct but the way yoiu have anwser might be not perfect..
Validation are perform at client side so they dont require server trip hence the page operation is fast,
You can get more information regarding validation from below link.
www . devhood . com/Tutorials/tutorial_details.aspx?tutorial_id=46
Re: Validation Controls in ASP.NET
all the validation controls ckecks both side client side and server side.if the page having any java script code this code will fire first than validation control checking. it takes little more time than javascript code .. in real time web application the validation controls doesnot provide full control or some user define code until u use custom control
vijay
Re: Validation Controls in ASP.NET
Every web application need some validation at UI bvos every time for validation request should not go to sever , so i think most of the developers choice is client side validation however in some of the cases they also use server side validation.
Re: Validation Controls in ASP.NET
"Because validation controls avoids round trip" if u had used this phrase, u would have knocked her down.
Re: Validation Controls in ASP.NET
[QUOTE=sameerphatak;30704]Hello all,
In one of the interviews that i gave recently, I was asked about how many types of validation controls exist in ASP.NET? I gave the answer as [B]6[/B]
The next question asked was.. [I][B]what is the advantage of using Validation Controls instead of normal coding?[/B][/I] I gave the answer : [B]because it reduces time[/B]. She was not very convinced with this answer. Guys do you have any other answers for this question??
Thanks in advance to all who answer.
Rgds,
Sameer[/QUOTE]
it is been done so these validation check are called front end check they are put check on client side when page is loaded on client computer once all check are done then only page will be post back
Re: Validation Controls in ASP.NET
Hey friend there are lots of advantage to implement validation , please dont answer all at atime try to convence.
The first one is , we need to validate the input type , a good practise for programming is dont take wrong input type and dont send request to server again and again. take the example of any registration page that have lots of the field and if user input wrong data type or empyt value or much long data then the bad request to the will increase and we should reduce the load to server and validate all inputs to the user level only.
please le tm eknow if you need any more example
Re: Validation Controls in ASP.NET
Actually all these validation controls operation takes place in the server side so it would take the server resources so eventually it would increase the network traffic so it is not wise to go for a validator control in the tool box. Always the validation part has to be done in the client side so the better option would be to go for the java script that makes the page more powefull, All the validators could be done with java script.
Re: Validation Controls in ASP.NET
[QUOTE=infoeweb;31265]all the validation controls ckecks both side client side and server side.if the page having any java script code this code will fire first than validation control checking. it takes little more time than javascript code .. in real time web application the validation controls doesnot provide full control or some user define code until u use custom control
vijay[/QUOTE]
Yes Vijay i do go with you only, Both Client and server side validation comes into picture. If the application fails in client side validation, then the application goes for the server side validation, where as in case of simple it is very difficult!
Re: Validation Controls in ASP.NET
Validation Controls validate at both Client and Server Side.....
Re: Validation Controls in ASP.NET
There are five types of ASP.NET Validation Controls in ASP.NET Framework that includes:
1. RequiredField Validation control: prompts message if any input field is left blank. This validation control can also be used to prompt message to the user if he or she has left any input field with its default value.
2. Range Validation control: Prompts message to the user, if the data entered in the input field is not within the range of the values specified by the Maximum and Minimum properties of the validation control.
3. Comparison Validation control: Allows the user to compare two values and check for comparisons such as equality, greater-than, less-than etc.
4. RegularExpression Validation control: Allows you to validate if the format of a certain input field is correct or not.
5.Custom Validation control: Allows you to define your own condition for validating the data in the input fields. Two validation functions can be performed using Custom Validation control: first on the server-side and second on the client-side. .
Re: Validation Controls in ASP.NET
I m not sure but also for nt using external jscript or we write normal codes its check at server side
[QUOTE=sameerphatak;30704]Hello all,
In one of the interviews that i gave recently, I was asked about how many types of validation controls exist in ASP.NET? I gave the answer as [B]6[/B]
The next question asked was.. [I][B]what is the advantage of using Validation Controls instead of normal coding?[/B][/I] I gave the answer : [B]because it reduces time[/B]. She was not very convinced with this answer. Guys do you have any other answers for this question??
Thanks in advance to all who answer.
Rgds,
Sameer[/QUOTE]
Re: Validation Controls in ASP.NET
I think all answers are correct but there is one thing missing.
Using client side validation only is a major security threat. someione might just submit the junk data to server if server side validation is not done. Thats why Validation controls are used which provides both client and server side validation to make it more secure.
Re: Validation Controls in ASP.NET
hi,
I am very new in QTP
In my application if i check validation for the registration Form so how can i check that?
Thanks in advanced
Regards,
Shivani Trivedi
Re: Validation Controls in ASP.NET
hello give one example for ado.net starting program
Re: Validation Controls in ASP.NET
All the validation controls checks both side client side and server side.If the page having any Java script code this code will fire first than validation control checking.