GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  DotNet
Go To First  |  Previous Question  |  Next Question 
 DotNet  |  Question 53 of 165    Print  
Briefly explain how the server control validation controls work.

  
Total Answers and Comments: 2 Last Update: January 16, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 21, 2005 05:12:02   #1  
Takrim Khan        

RE: Briefly explain how the server control validation controls work.
A validation control works by evaluating the value of an input server control on the page to see whether it meets certain criteria. The input control to evaluate is specified through the validation control s ControlToValidate attribute. You can programmatically cause a validation control to perform its evaluation by calling its Validate method which sets the validation control s IsValid property to true if validation succeeds and false if it fails. You can cause all of the validation controls on a page to validate their input controls by calling the Page.Validate method.

The Page.IsValid property is set to true if validation succeeds for all validation controls within the page; otherwise it's false. The Page.Validate method is automatically invoked when a button control whose CausesValidation property is set to true is clicked. CausesValidation is set to false by default for a reset or clear button. The button click event is suppressed if IsValid is false for any validation control on the page



 
Is this answer useful? Yes | No
January 16, 2006 06:17:58   #2  
samiksc Member Since: October 2005   Contribution: 233    

RE: Briefly explain how the server control validation ...

There are following types of validation controls provided by ASP.Net:

  1. RequiredFieldValidator
  2. CompareValidator
  3. RangeValidator
  4. RegularExpressionValidator
  5. CustomValidator

These controls are server side controls. However in up-level browsers that is IE 4.0 and above these can be enabled on client side also.

All these controls have a property called ControlToValidate.

RequiredFieldValidator ensures data entry into the ControlToValidate.

CompareValidator uses ControlToValidate ControlToCompare and operator properties to compare a control's value with another control's value. It also has a property 'ValueToCompare' for comparing ControlToValidate against a constant value.

RangeValidator uses ControlToValidate MaximumValue and MinimumValue to compare a controls value against a range.

RegularExpressionValidator uses ControlToValidate and ValidationExpression properties.

CustomValidator performs its task by using ClientValidationFunction and OnServerValidate delegate.


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Server-side code: 1. Code is written in VB, C# or other compiled languages. 2. Code is executed by the server during a roundtrip in response to a user request or action. 3. The server executes server side code and returns HTML code to the client ...

Latest Answer : C# ...

Latest Answer : Another reason to consider server validation is a synchronization issue.Say I want to book a ticket tomorrow for the cinema. Even if the application brings all necessary information for validation, meaning both the date format and all available dates ...

Latest Answer : In ADO, the in-memory representation of data is the recordset. In ADO.NET, it is the dataset. There are important differences between them. A recordset looks like a single table. If a recordset is to contain data from multiple database tables, ...

Latest Answer : Diffgram is the XML format which is used to identify the current and orginal version. ...

Latest Answer : Inheritance means able to inherete the class from base class. The inherete class called derived class.The main advantage of the inheritance if any modification done origanl class safe.This is for reusable. ...

Latest Answer : In ASP.NET there is three ways to manage session objects. one support the in-proc mechanism and other two's support the out-proc machanism.  1) In-Proc (By Default) 2) SQL-Server (Out-proc) 3) State-Server (Out-Proc)  ...

Latest Answer : dataadapter.fill(ds)The beauty of this method is it automatically implicitly opens the connection to database and closes it once done.We dont need to worry about opening and closing the connection to the database. ...

Latest Answer : not possible but format can,.. ...

Latest Answer : ItemTemplate ...


 Sponsored Links

 
Related Articles

SQL Server 2005 Integration Services Review

SQL Server 2005 Integration Services using Visual Studio 2005 A Beginner s Guide SQL Server 2005 A offering of Microsoft Corporation for database management the SQL server 2005 is one of the powerful database management systems in the world Available for integration in almost any system that uses Mi
 

SQL Server Integration Services

SQL Server Integration Services Here is a sample chapter from Beginners Guide to SQL Server Integration Services Using Visual Studio 2005 by Jayaram Krishnaswamy Environment set up for Visual Studio 2005 with respect to SSIS and multiple tasking Connecting to Microsoft Access Text Files Excel S
 

High Level Data Link Control (HDLC)

High Level Data Link Control HDLC The High Level Data Link Control protocol was developed by the International Organization for Standardization ISO It is used for switched and non switched networks and is a bit oriented architecture The High Level Data Link Control has been accepted and used widel
 

Synchronous Data Link Control (SDLC)

Synchronous Data Link Control SDLC The SDLC or the Synchronous Data Link Control was first developed by IBM It is basically a linked layer protocol which can be used with systems network architecture or the SNA environment In this system all the functions in a network can be defined and slotted into
 

Web Server

Web Server A web server can be a program or the computer itself which receives the requests from various other browsers and responds to those requests These requests are all requests that are being sent for some documents There are two kinds of web servers available The web server program and the
 

How EDI work with XML

How EDI work with XML EDI and XML systems have been seen as the opportunity to create a holistic approach to data information exchange that can deliver and process simple durable and effective business transactions by electronic means To achieve this methods must be employed that are not only of val
 

ERP Operation and Control

ERP Operation and Control The selection of the most suitable management system is it a difficult decision to make but once it is decided the next step is the operation and maintenance of ERP It is necessary to know well all the capacities and abilities in order to exploit the system to its fullest e
 

ERP Systems as Quality Control Support

ERP Systems as Quality Control Support For the past few years ERP systems have became one of the most powerful tools for quality control management But ERP is just an informatics system that provides support to the integrated business management mosgoogle center Goals of the Quality Control Module i
 

Client-Server Models and N-Tier Applications

Client Server Models and N Tier Applications One of principal objective of Client Server methods is to provide data to an end user However Client Server architectural methodologies are much more complex Client Server describes the process wherein a client program generates contact with a separate se
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape