AWP viva

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Explain inheritance and polymorphism.

Inheritance
Inheritance is the concept we use to build new classes using the existing class definitions. It is a
process in which one object acquires all the properties and behaviors of its parent object
automatically.In C#, the class which inherits the members of another class is called derived class and
the class whose members are inherited is called base class.
Polymorphism
Polymorphism is a feature of OOPs that allows the object to behave differently in different conditions.
Polymorphism is also known as one name many form. It provides the ability to a class to have
multiple implementations with the same name.

What is a namespace? How to create a namespace and alias?


A namespace is designed for providing a way to keep one set of names separate from another. The
class names declared in one namespace does not conflict with the same class names declared in
another.

What is user control? How to create and use user control in ASP.NET Page.
The UserControl gives you the ability to create controls that can be used in multiple places
within an application or organization. ... This gives you the ability to reference the user
control in many applications and save time laying out and coding the contained elements of the
user control.

Explain the three layer architecture of ASP.NET. Asp.net architecture


consists of 3 layers as follows:
Presentation Layer
The presentation layer consists of the Asp.net page that manages the appearance of application. we
present the controls in frontend like textbox, dropdown list etc.
Business logic Layer(also known as middle layer)
Business Logic Layer contains the business logic.
Database Layer
Data Access Layer is used to connect the Business Logic Layer to Data Base to perform the CRUD
operations like Insert , Delete, Update, Select and so on.

What is Debugging? Explain in ASP.NET


Debugging allows the developers to see how the code works in a step-by-step manner, how the values
of the variables change, how the objects are created and destroyed, etc.

Why exception handling is required? Write syntax for user define exception?
Exception handling: The mechanism of Exception Handling is throwing an exception and catching it C#
uses try-catch block. Code which may give rise to exceptions is enclosed in a try block, and Catch block
catches that exception and handles it appropriately. The try block is followed by one or more catch
blocks.
Basic syntax:
try { //programming logic(code which may give rise to exceptions)
}
catch (Exception e)
{ //message on exception }
finally
{ // always executes }

What is ADO.Net? Explain its architecture


ADO.NET provides a bridge between the front-end controls and the back-end database.
ADO.NET provides consistent access to data sources such as SQL Server and XML, and to data
sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET
to connect to these data sources and retrieve, handle, and update the data that they contain.

What is data binding? Its types.


ASP.NET allows powerful feature of data binding
 Data Binding is binding controls to data from databases.
 With data binding we can bind a control to a particular column in a table from the database
or we can bind the whole table to the data grid.
 Data binding provides simple, convenient, and powerful way to create a read/write link
between the controls on a form and the data in their application.
 Data binding allows you to take the results of properties, collection, method calls, and
database queries and integrate them with your ASP.NET code.
 There are two types of data-binding in ASP.NET namely, simple data-binding and declarative
data binding

What is XDocument? Explain with example

The XDocument class contains the information necessary for a valid XML document, which
includes an XML declaration, processing instructions, and comments. You only have to create
XDocument objects if you require the specific functionality provided by the XDocument class

What is XElement? Explain with example

The XElement class is one of the fundamental classes in LINQ to XML. It represents an XML element.
The following list shows what you can use this class for: Create elements. Change the content of the
element.

What is AJAX? Its Advantages and Disadvantages


AJAX stands for Asynchronous JavaScript And XML. In a nutshell, it is the use of the XMLHttpRequest
object to communicate with servers. It can send and receive information in various formats, including
JSON, XML, HTML, and text files.

Advantages
 Reduces the server traffic and increases the speed

 It is responsive, and the time taken is also less

 Form validation

 Bandwidth usage can be reduced

 Asynchronous calls can be made; this reduces the time for data arrival.

Disadvantages
 Open-source

 For security reasons, you can only access information from the web host that serves pages. Fetching

information from other servers is not possible with Ajax.

You might also like