- RequiredFieldValidator
- CompareValidator
- RangeValidator
- RegularExpressionValidator
- CustomValidator
- ValidationSummary
Brahmbhatt Deepal
Tuesday, November 15, 2011
Six different validation server controls are available for ASP.NET:
Friday, November 4, 2011
SQL HAVING Clause
Having clause is used to filter data based on the group functions. This is similar to WHERE condition but is used with group functions. Group functions cannot be used in WHERE Clause but can be used in HAVING clause.
For Example: If you want to select the department that has total salary paid for its employees more than 25000, the sql query would be like;
The output would be like:
When WHERE, GROUP BY and HAVING clauses are used together in a SELECT statement, the WHERE clause is processed first, then the rows that are returned after the WHERE clause is executed are grouped based on the GROUP BY clause. Finally, any conditions on the group functions in the HAVING clause are applied to the grouped rows before the final output is displayed.
For Example: If you want to select the department that has total salary paid for its employees more than 25000, the sql query would be like;
SELECT dept, SUM (salary)
FROM employee
GROUP BY dept
HAVING SUM (salary) > 25000
The output would be like:
dept | salary | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
------------- | ------------- | |||||||||||
Electronics | 55000 | |||||||||||
Aeronautics | 35000 | |||||||||||
InfoTech | 30000 |
Thursday, November 3, 2011
Difference between method overriding and overloading
there is big difference between both:
see following example
When overriding, you change the method behavior for a derived class.
e.g Clas A
{
Virtual void hi(int a)
{
}
}
Class B:A
{
public overrid void hi(int a)
{
}
}
Overloading simply involves having a method with the same name within the class.
Example for Over loading
Class A
{
class a()
{
}
class a(int a)
{
}
}
see following example
When overriding, you change the method behavior for a derived class.
e.g Clas A
{
Virtual void hi(int a)
{
}
}
Class B:A
{
public overrid void hi(int a)
{
}
}
Overloading simply involves having a method with the same name within the class.
Example for Over loading
Class A
{
class a()
{
}
class a(int a)
{
}
}
Wednesday, November 2, 2011
What is the difference between a class and a structure?
Class:
Structure:
- A class is a reference type.
- The members of a class are private by default.
- While instantiating a class, CLR allocates memory for its instance in heap.
- Classes support inheritance.
- Variables of a class can be assigned as null.
- Class can contain constructor/destructor.
Structure:
- A structure is a value type.
- The members of a structure are public by default
- In structure, memory is allocated on stack.
- Structures do not support inheritance.
- Structure members cannot have null values.
- Structure does not require constructor/destructor and members can be initialiazed automatically.
What is CLR, CTS, CLS in .NET?
Common Language Runtime (CLR)
One of the most important component of .NET framework is CLR, also known as runtime. It provides functionalities like
Common Type System (CTS)
The CTS specifies certain guidelines for declaring, using, and managing types at runtime. The functions performed by the CTS are as follows:
Common Language Specification (CLS)
The CLS consists of a set of basic language features that are required by many applications to communicate with other objects, irrespective of the language in which they are implemented. The CLS rules define a subset of the common type system. These objects must expose only those features that are common to all the languages they need to interact with. The components which adhere to these features are said to be CLS compliant components. In simple words it facilitates cross-language interoperability.
One of the most important component of .NET framework is CLR, also known as runtime. It provides functionalities like
- Memory Management
- Exception handling
- Debugging
- Code Access Security (CAS)
- Thread Execution
- Compilation
Common Type System (CTS)
The CTS specifies certain guidelines for declaring, using, and managing types at runtime. The functions performed by the CTS are as follows:
- Cross-language communication, type safety, and high performance execution of code.
- Object-oriented model for implementation of different programming languages.
- Guidelines for different languages to follow, ensuring proper interaction between objects implemented in different programming languages.
Common Language Specification (CLS)
The CLS consists of a set of basic language features that are required by many applications to communicate with other objects, irrespective of the language in which they are implemented. The CLS rules define a subset of the common type system. These objects must expose only those features that are common to all the languages they need to interact with. The components which adhere to these features are said to be CLS compliant components. In simple words it facilitates cross-language interoperability.
CLR - CTS - CLS
The .NET Framework provides a runtime environment called the Common Language Runtime or CLR (similar to the Java Virtual Machine or JVM in Java), which handles the execution of code and provides useful services for the implementation of the program.
The Common Language Runtime is the underpinning of the .NET Framework. CLR takes care of code management at program execution and provides various beneficial services such as memory management, thread management, security management, code verification, compilation, and other system services. The managed code that targets CLR benefits from useful features such as cross-language integration, cross-language exception handling, versioning, enhanced security, deployment support, and debugging.
Common Type System (CTS) describes how types are declared, used and managed in the runtime and facilitates cross-language integration, type safety, and high performance code execution.
The Common Language Specification (CLS) is an agreement among language designers and class library designers to use a common subset of basic language features that all languages have to follow.
what is difference between class and object?
Class is templet for an object.
Object is an instance of a class.
Monday, October 24, 2011
What is the basic difference between ASP and ASP.NET?
The basic difference between ASP and ASP.NET is that ASP is interpreted; whereas, ASP.NET is compiled. This implies that since ASP uses VBScript; therefore, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).
Subscribe to:
Posts (Atom)