1) Web Application consists of one or many web forms
2) the web form are nothing without the web application
--* What’s the top .NET class that everything is derived from?
System.Object.
--* Can you inherit multiple interfaces?
Yes.Dot NET does support multiple interfaces
--* Is it possible to Override Private Virtual methods.
No, as you cannot declare a method as ‘private virtual’
--* What is the syntax to inherit from a class in C#?
Example: class NewClassName : BaseClassName
--* what is the different between virtual method and abstract method :
1) Abstract methods are required to be overridden
2) Virtual methods are not required to be overridden
3) Abstract method is a method without body or immplementation
4) An abstract method can only appear in an abstract class.
5) Methods declared as "abstract" do not have an implementation so this forces the derived class to provide an implementation for them by overriding these abstract method
6) Methods declared as "virtual" have an implementation and the derived class has the option of overriding this method
--* What is the difference between control and component :
1) Component, which has no visible interface and adds specific functionality to project
2) Control, such as a Data Grid or simple Textbox, is a basic element of the user interface
3) Components are classes compiled into a DLL file
4) Controls are assemblies
--* The Difference Between the HAVING and WHERE Clauses in a SQL Query :
1) The WHERE clause can be used without the GROUP BY clause
2) The HAVING clause cannot be used without the GROUP BY clause but When GROUP BY is not used,HAVING behaves like a WHERE clause.
3) The WHERE clause selects rows before grouping
4) The HAVING clause selects rows after grouping
5) The WHERE clause cannot contain aggregate functions
6) The HAVING clause can contain aggregate functions
7) HAVING can be used only with the SELECT statement
8) The WHERE clause can be used with select , update , delete statements
--* Can DateTime variables be null?
DateTime is a value type, it cannot be null
--* State three different new features introduced in C# 2.0 :
1) Static classes
2) Compression and Decompression classes
3) Generics
4) Partial types
--* What is the difference between TRUNCATE and DELETE commands?
1) The DELETE statement removes one or more rows from a table or view by using a transaction.
2) The TRUNCATE TABLE statement is used to remove all rows from a table without using a transaction.
3) TRUNCATE is a Data Definition Language DDL command
4) DELETE is a Data Manipulation Language DML command
5) WHERE clause can be used with DELETE
6) WHERE clause can't be used with TRUNCATE.
--* what is difference between "Primary key" and "Unique key"?
1) unique key can allow one null but primariy key can't be null.
2) primariy key can be refrenced to other table as Foreign keys.
3) we can have multiple unique key in a table but primariy key is one and only one in a table.
4) primariy key in itself is unique key.
5) Primary Key Creates Clustered Index and Unique Key Creates NonClustered Index
6) Each table in database must has one primary key
7) No duplicate values are entered with unique key
--* A foreign key : is a column of a table that is the primary key of another table.
--* Microsoft SQL Server supports the following constraints:
1) PRIMARY KEY Constraints
2) UNIQUE Key Constraints
3) FOREIGN KEY Constraints
4) CHECK Constraints (>, <, <=, >=, <>, =)
5) NOT NULL Constraints
6) Default Constraints
--* What is Identity colomn?
1) It is used to automatically numbering a field based on the previous field values of existing rows
2) It is usually used for a primary key
--* What is the different between Batch and Script?
1) A batch is a set of Transact-SQL statements that are submitted together and executed as a group
2) Batches can be run as a part of script
3) script can include more than one batch of Transact-SQL statements.
4) If a syntax error exists in a batch, none of the statements in that batch executes.Execution begins with the next batch.
5) Use a GO statement at the end of a batch
6) A Script Is One or More Transact-SQL Statements Saved as a File Using the .sql Extension
--* Types of Transact-SQL Statements:
1) Data Definition Language (DDL) statements: which allow you to create objects in the database. (Create , Alter , Drop)
2) Data Control Language (DCL) statements, which allow you to determine who can see or modify the data. (Grand , Deny , REVOKE)
3) Data Manipulation Language (DML) statements, which allow you to query and modify the data. (Select , Insert,Update, Delete)
--* There are two type of comment in SQL Server:
1) In-line Comments (--)
2) Block Comments (/* lines */)
--* Types of Join in SQL Server:
1) Inner Join : displays only the rows that have matching rows in both the tables.
2) Outer Join: return all the rows from at least one of the table
3) Left outer join : returns all the records from left table and only matching records from right table.
4) Right outer join: returns all the records from right table and only matching records from left table.
5) A cross join or Full join: returns the sets of records from the two joined tables. If A and B are two sets then cross join = A X B.
6) Self Join : A table is join to itself in a self join.
--* What is difference between ExecuteNonQuery and ExecuteScaler?
1) ExecuteScalar will return only a single value i,e 1st row & 1st column.
2) ExecuteNonQuery executes commands and returns number of rows affected by Insert,Update & Delete operations
--* A Stored Procedure: Is a Precompiled Collection of Transact-SQL Statements
--* Stored Procedures Can:
1) Contain statements that perform operations
2) Accept input parameters
3) Return status value to indicate success or failure
4) Return multiple output parameters
--* Advantages of Using Stored Procedures:
1) Share Application Logic
2) Provide Security Mechanisms
3) Improve Performance
4) Reduce Network Traffic
--* A Trigger: Is a Special Type of Stored Procedure
--* Trigger can't be called directly and do not pass or accept parameters.
--* When i Excute Sql query the SQL do:
1) check if there is any syntix error in query
2) check the name of table in my database if exist or not
3) check colomn in my table if exist or not
4) Excute at the end
--* Where do you think the users names and passwords will be stored in sql server? They get stored in master database in the sysxlogins table
--* What is difference between ‘Count’ and ‘Count(*)’?
1) ‘Count’: Counts the number of non-null values in table
2) ‘Count(*)’: Counts the number of rows in the table, including null values and duplicates
--* What are the benefits of SQL ?
1. It is flexible, Powerful and easy to learn
2. It is a non-procedural language
3. It provides commands for a variety of tasks
4. All RDBMS supports SQL
--* What are the different types of caching :
ASP.NET has three kinds of caching strategies are
1) Output Caching : Caches the whole page
2) Fragment Caching : Caches a part of the page
3) Data Caching : Caches the data
--* How do I send e-mail from an ASP.NET application?using System.Web.Mail; MailMessage message = new MailMessage ();
message.From = ;message.To = ;
message.Subject = “Scheduled Power Outage”;
message.Body = “Our servers will be down tonight.”;
SmtpMail.SmtpServer = “localhost”;
SmtpMail.Send (message);
--* Access Modifier :They are public , protected , internal , internal protected , private
--* What is DTD in XML document ?
• DTD is Document Type Definition
• A DTD defines the legal elements of an XML document
--* What is an .ASP file?
It is a Text File that contains the combination of the following:
• Text
• HTML tags
• Script Commands
--* What is purpose of XPath ?
1) XPath is a language for finding information in an XML document.
2) XPath is used to navigate through elements and attributes in an XML document
--* What is a Static Class :
1) Static Class is a new feature in C# 2.0
2) It is a class that have a static keyword
3) All Static Class members are also static
4) Static classes cannot be instantiated
5) Static classes are sealed
6) Static members can use without create instance of it's class
--* The constructor of the base clase will be called before the constructor of the drived class
--* The protected member can be seen in the drived class
--* How do you deploy ASP.NET application?
You can deploy an ASP.NET Web application using any one of the following three deployment options.
1.XCOPY Deployment
2.Using the Copy Project option in VS .NET
3.Deployment using VS.NET installer
--* How many types of validation controls are provided in ASP.NET?
1) RequiredField Validator Control
2) Range Validator Control
3) RegularExpression Validator Control
4) Custom Validator Control
5) Validation Summary Control
6) CompareValidator control
--* List the types of Authentication supported by ASP.NET.
1) Windows authentication (default)
2) Forms authentication
3) Passport authentication
4) None or custom authentication (Security disabled)
--* Is it possible to see the code that ASP.NET generates from an ASPX file : Yes , By doing one of the following:
1) enabling debugging using a <%@ Page Debug="true" %> in page directive in the ASPX file
2) set a


No comments:
Post a Comment