SQL is Structured Query Language

Posted on Updated on

What is SQL?
SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in relational database.

SQL is the standard language for Relation Database System. All relational database management systems like MySQL, MS Access, and Oracle, Sybase, Informix, postgres and SQL Server use SQL as standard database language.

Why SQL?
Allows users to access data in relational database management systems.
Allows users to describe the data.
Allows users to define the data in database and manipulate that data.
Allows embedding within other languages using SQL modules, libraries & pre-compilers.
Allows users to create and drop databases and tables.
Allows users to create view, stored procedure, functions in a database.
Allows users to set permissions on tables, procedures, and views

How the SQL Process work?
When you are executing an SQL command for any RDBMS, the system determines the best way to carry out your request and SQL engine figures out how to interpret the task.
There are various components included in the process. These components are Query Dispatcher, Optimization Engines, Classic Query Engine and SQL Query Engine, etc. Classic query engine handles all non-SQL queries but SQL query engine won’t handle logical files.
Following is a simple diagram showing SQL Architecture:

Structured Query Language
SQL Process

Posted by Vissicomp Technology http://www.vissicomp.com


Validation Groups:

Posted on

Validation Groups:

Complex pages have different groups of information provided in different panels. In such a situation a need for performing validation separately for separate group, might arise. This kind of situation is handled using validation groups. To create a validation group, you should put the input controls and the validation controls into the same logical group by setting their ValidationGroup property.

The following example describes a form to be filled up by all the students of a school, divided into four houses, for electing the school president. We will be using the validation controls to validate the user input.

The content file code:


Please Choose a Candidate
M H Kabir
Steve Taylor
John Abraham
Venus Williams




The code behind the submit button:
protected void btnsubmit_Click(object sender, EventArgs e)
if (Page.IsValid)
{ lblmsg.Text = “Thank You”; }
{ lblmsg.Text = “Fill up all the fields”; }}

The Validation Control Classes

Posted on

The BaseValidator Class:
The validation control classes inherit from the BaseValidator class and inherit its properties and methods. Therefore, it would help to take a look at the properties and the methods of this base class, which are common for all the validation controls:
Members Description
ControlToValidate Indicates the input control to validate.
Display Indicates how the error message is shown.
EnableClientScript Indicates whether client side validation will take.
Enabled Enables or disables the validator.
ErrorMessage Error string.
Text Error text to be shown if validation fails.
IsValid Indicates whether the value of the control is valid.
SetFocusOnError It indicates whether in case of an invalid control, the focus should switch to the related input control.
ValidationGroup The logical group of multiple validators, where this control belongs.
Validate() This method revalidates the control and updates the IsValid property.

The RequiredFieldValidator:
The RequiredFieldValidator control ensures that the required field is not empty. It is generally tied to a text box to force input into the text box.
The syntax for the control:

The RangeValidator:
The RangeValidator control verifies that the input value falls within a predetermined range.
It has three specific properties:
Properties Description
Type it defines the type of the data; the available values are: Currency, Date, Double, Integer and String
MinimumValue it specifies the minimum value of the range
MaximumValue it specifies the maximum value of the range

The syntax for the control:

The CompareValidator:
The CompareValidator control compares a value in one control with a fixed value, or, a value in another control.
It has the following specific properties:
Properties Description
Type it specifies the data type
ControlToCompare it specifies the value of the input control to compare with
ValueToCompare it specifies the constant value to compare with
Operator it specifies the comparison operator, the available values are: Equal, NotEqual, GreaterThan, GreaterThanEqual, LessThan, LessThanEqual and DataTypeCheck

The basic syntax for the control:

The RegularExpressionValidator
The RegularExpressionValidator allows validating the input text by matching against a pattern against a regular expression. The regular expression is set in the ValidationExpression property.
The following table summarizes the commonly used syntax constructs for regular expressions:
Character Escapes Description
\b Matches a backspace
\t Matches a tab
\r Matches a carriage return
\v Matches a vertical tab
\f Matches a form feed
\n Matches a new line
\ Escape character
Apart from single character match, a class of characters could be specified that can be matched, called the meta characters.
Metacharacters Description
. Matches any character except \n
[abcd] Matches any character in the set
[^abcd] Excludes any character in the set
[2-7a-mA-M] Matches any character specified in the range
\w Matches any alphanumeric character and underscore
\W Matches any non-word character
\s Matches whitespace characters like, space, tab, new line etc.
\S Matches any non-whitespace character
\d Matches any decimal character
\D Matches any non-decimal character
Quantifiers could be added to specify number of times a character could appear
Quantifier Description
* Zero or more matches
+ One or more matches
? Zero or one matches
{N} N matches
{N,} N or more matches
{N,M} Between N and M matches
The syntax for the control:


Posted on

 ASP.NET provides six validations controls that can be used to validate the data on a web form and validate the user input data to ensure that useless, unauthenticated or contradictory data does not get stored.
 This validation controls can be used with HTML and Web Server controls. Six validation controls are available with ASP.NET as of now, they are as follows –
The RequiredFieldValidator Control – Ensures that the user does not skip a mandatory entry field.
The CompareValidator Control – Compares one controls value with another controls value, constants and data type using a comparison operator (equals, greater than, less than, and so on).
The RangeValidator Control – Checks the user’s input is in a given range (eg: numbers or characters).
The RegularExpressionValidator Control – Checks that the user’s entry matches a pattern defined by a regular expression.
The CustomValidator Control – Checks the user’s entry using custom-coded validation logic.
The ValidationSummary Control – Displays a summary of all validation errors inline on a web page, in a message box, or both.


Posted on

¾    CSS stands for Cascading Style Sheets

¾    Styles define how to display HTML elements

¾    Styles were added to HTML 4.0 to solve a problem

¾    External Style Sheets can save a lot of work

¾    External Style Sheets are stored in CSS files



Inline Styles

An inline style loses many of the advantages of style sheets by mixing content with presentation. Use this method sparingly!

To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a paragraph:

<p style=”color:sienna;margin-left:20px”>This is a paragraph.</p>


Internal or Embedded Style Sheet

An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section of an HTML page, by using the <style> tag, like this:

<head> <style> hr {color:sienna;} p {margin-left:20px;} body {background-image:url(“images/back40.gif”);} </style> </head>


Posted on


Global.asax is a class file that is used to specify the session and application event handlers for a web application. The Global.asax file resides in the root directory of an asp.net web application and is also called the ASP.NET application file. This file contains the code that is executed when certain events, such as start of an application or error in an application, are raised by an ASP.NET web application.

Events and states, such as session state and application state, which are specified in the Global.asax file, are applied to all the resources of the web application. For example, if an application state variable is defined in the Global.asax file, then all the .aspx files with the root directory can access the variable.

The code in the Global.asax file is written in the same way as in web forms; the only difference is that the code written in the Global.asax file does not contain HTML or ASP.NET tags. Instead, the code in this file contains methods with predefined names.

¾    The Global.asax file added to the ASP.NET web application contains empty event handlers for the commonly used application events, such as the start and end of an application. The code for the event handlers is inserted in the appropriate method of the Global.asax file. The name of the method for which an event hadler is created should be similar to the name of the event occurring in the web application. For example, the Application_start() method is called when the Application_Start event occurs in the ASP.NET web application.

The Global.asax file can be used either for initializing the application and session state variables or clearing out the memory by destroying all such variables. The Global.asax file consists of following events that can be handled using it:

  • Application_Init: Fires when the application initializes for the first time.
  • Application_Start: Fires the first time an application starts.
  • Session_Start: Fires the first time when a user’s session is started.
  • Application_BeginRequest: Fires each time a new request comes in.
  • Application_EndRequest: Fires when the request ends.
  • Application_AuthenticateRequest: Indicates that a request is ready to be authenticated.
  • Application_Error: Fires when an unhandled error occurs within the application.
  • Session_End: Fires whenever a single user Session ends or times out.
  • Application_End: Fires when the application ends or times out (Typically used for application cleanup logic).