Today Topic Discuss c# asp.net interview questions and answers. It is a framework of Microsoft development you can develop web application window application and mobile app. then framework using c# vb.net creating dynamic websites using a c# asp.net.
so today discuss a c# asp.net interview questions and answers follow the questions and answers.
best website learn c# asp.net follow link https://www.tutorialspoint.com/asp.net/index.htm
1. What is ASP.NET?
Answer:
ASP.NET was developed in direct response to the problems that developers had with classic
ASP. Since ASP is in such wide use, however, Microsoft ensured that ASP scripts execute without
modification on a machine with the .NET Framework (the ASP engine, ASP.DLL, is not modified when
installing the .NET Framework). Thus, IIS can house both ASP and ASP.NET scripts on the same machine.
2.What is an Object and a Class?
Answer:
A Class is an encapsulation of properties and methods that are used to represent a real-time
entity. It is a data structure that brings all the instances together in a single unit.
An Object in an instance of a Class. Technically, it is just a block of memory
allocated that can be stored in the form of Variables, Array or a Collection.
3.Discuss Client-Side Validation:
Answer:
When validation is done on the client browser, then it is known as Client-Side Validation. We use
JavaScript to do the Client-Side Validation.
4. Define Constructors?
Answer:
A constructor is a member function in a class that has the same name as its class.
The constructor is automatically invoked whenever an object class is created.
It constructs the values of data members while initializing the class.
5. Difference between C++ and C#?
6.Explain Namespaces in C#
Answer:
They are used to organize large code projects. “System” is the most widely used namespace in
C#. We can create our own namespace and use one namespace in another, which are called Nested Namespaces.
They are denoted by the keyword “namespace”.
7.Server-Side Validation:
Answer:
When validation occurs on the server, then it is known as Server-Side Validation. Server-Side Validation
is a secure form of validation. The main advantage of Server-Side Validation is if the user somehow
bypasses the Client-Side Validation, we can still catch the problem on server-side.
The following are the Validation Controls in ASP.NET:
RequiredFieldValidator Control
CompareValidator Control
RangeValidator Control
RegularExpressionValidator Control
CustomFieldValidator Control
ValidationSummary
8.What are Async and Await?
Answer:
Async and Await keywords are used to create asynchronous methods in C.Asynchronous programming means that the process runs independently of main or other processes.
9.What are the different types of classes in C#?
Answer:
1.Partial class --- Allows its members to be divided or shared with multiple .cs files. It is denoted by the keyword Partial.
2.Sealed class-- It is a class which cannot be inherited. To access the members of a sealed class,
we need to create the object of the class. It is denoted by the keyword Sealed.
3.Abstract class-- It is a class whose object cannot be instantiated. The class can only be
inherited. It should contain at least one method. It is denoted by the keyword abstract.
4.Static class-- It is a class which does not allow inheritance. The members of the class are also static.
It is denoted by the keyword static. This keyword tells the compiler to check for any accidental instances of the static class.
10.What are the different validators in ASP.NET?
Answer:
ASP.NET validation controls define an important role in validating the user input data.
Whenever the user gives the input, it must always be validated before sending it across to various
layers of an application. If we get the user input with validation, then chances are that we are sending
the wrong data. So, validation is a good idea to do whenever we are taking input from the user.
There are the following two types of validation in ASP.NET:
Client-Side Validation
Server-Side Validation
11.What are the fundamental OOP concepts?
Answer:
1.Encapsulation –
The Internal representation of an object is hidden from the view outside
object’s definition. Only the required information can be accessed whereas the rest of the data implementation is hidden.
2.Abstraction --
It is a process of identifying the critical behavior and data of an object and eliminating the irrelevant details.
3.Inheritance--
It is the ability to create new classes from another class. It is done by accessing, modifying and extending the behavior of objects in the parent class.
4.Polymorphism --
The name means, one name, many forms. It is achieved by having multiple methods with the same name but different implementations.
12.What is .net Framwork
Answer:
The .Net framework is a software development platform developed by Microsoft.
framework was meant to create applications, which would run on the Windows Platform.
The first version of the .Net framework was released in the year 2002.
The version was called the .Net framework 1.0. The .Net framework has come a long way since then, and the current version is 4.7.1.
As noted in an earlier section, a developer can develop an application in a variety of .Net programming languages. 1. Language - The first level is the programming language itself, the most common ones are VB.Net and C#.
2.Compiler – There is a compiler which will be separate for each programming language. So underlying the VB.Net language,
there will be a separate VB.Net compiler. Similarly, for C#, you will have another compiler.
3.Common Language Interpreter – This is the final layer in .Net which would be used to run a .net program developed in any programming language.
So the subsequent compiler will send the program to the CLI layer to run the .Net application.
13.What is “using” statement in C#?
Answer:
“Using” Keyword denotes that the particular namespace is being used by the program.
using System. Here System is a namespace. The class Console is defined under System
So we can use the console.writeline (“….”) or readline in our program.
14.What is a Generic Class?
Answer:
Generics or Generic class is used to create classes or objects which do not have any specific
data type. The data type can be assigned during runtime, i.e when it is used in the program.
15.What is Ajax in ASP.NET?
Answer:
Ajax stands for Asynchronous JavaScript and XML; in other words Ajax is the combination of
various technologies such as a JavaScript, CSS, XHTML, DOM, etc.
AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the
server behind the scenes. This means that it is possible to update parts of a web page, without
reloading the entire page.
With AJAX, when a user clicks a button, you can use JavaScript and DHTML to immediately update the UI, and spawn an asynchronous
request to the server to fetch results.
When the response is generated, you can then use JavaScript and CSS to update your UI
accordingly without refreshing the entire page. While this is happening, the form on the users
screen doesn't flash, blink, disappear, or stall.
16.What is an Abstract Class?
Answer:
An Abstract class is a class which is denoted by abstract keyword and can be used only as a
Base class. An Abstract class should always be inherited. An instance of the class itself cannot be
created. If we do not want any program to create an object of a class, then such classes can be made abstract.
Any method in the abstract class does not have implementations in the same class. But they must be implemented in the child class.
Example:
17.What is an Interface?
Answer:
An Interface is a class with no implementation. The only thing that it contains
is the declaration of methods, properties, and events.
c basic programming list follow this link https://qnainterviewa.blogspot.com/2019/09/top-c-programming-examples-with-output.html
so today discuss a c# asp.net interview questions and answers follow the questions and answers.
best website learn c# asp.net follow link https://www.tutorialspoint.com/asp.net/index.htm
1. What is ASP.NET?
Answer:
ASP.NET was developed in direct response to the problems that developers had with classic
ASP. Since ASP is in such wide use, however, Microsoft ensured that ASP scripts execute without
modification on a machine with the .NET Framework (the ASP engine, ASP.DLL, is not modified when
installing the .NET Framework). Thus, IIS can house both ASP and ASP.NET scripts on the same machine.
2.What is an Object and a Class?
Answer:
A Class is an encapsulation of properties and methods that are used to represent a real-time
entity. It is a data structure that brings all the instances together in a single unit.
An Object in an instance of a Class. Technically, it is just a block of memory
allocated that can be stored in the form of Variables, Array or a Collection.
3.Discuss Client-Side Validation:
Answer:
When validation is done on the client browser, then it is known as Client-Side Validation. We use
JavaScript to do the Client-Side Validation.
4. Define Constructors?
Answer:
A constructor is a member function in a class that has the same name as its class.
The constructor is automatically invoked whenever an object class is created.
It constructs the values of data members while initializing the class.
5. Difference between C++ and C#?
C# | CPP |
---|---|
1.C# is a higher-level programming language built over C++ programming language. | 1.C++ is a low-level programming language built by adding object-oriented concepts to the C programming language. |
2.It is similar to Java. | 2.It is NOT similar to Java. |
3.It can be considered as a hybrid programming language consisting of features of C++ and ease of use of VB.Net. | 3.C++ itself is a language and does not inherit any features of other languages. |
6.Explain Namespaces in C#
Answer:
They are used to organize large code projects. “System” is the most widely used namespace in
C#. We can create our own namespace and use one namespace in another, which are called Nested Namespaces.
They are denoted by the keyword “namespace”.
7.Server-Side Validation:
Answer:
When validation occurs on the server, then it is known as Server-Side Validation. Server-Side Validation
is a secure form of validation. The main advantage of Server-Side Validation is if the user somehow
bypasses the Client-Side Validation, we can still catch the problem on server-side.
The following are the Validation Controls in ASP.NET:
RequiredFieldValidator Control
CompareValidator Control
RangeValidator Control
RegularExpressionValidator Control
CustomFieldValidator Control
ValidationSummary
8.What are Async and Await?
Answer:
Async and Await keywords are used to create asynchronous methods in C.Asynchronous programming means that the process runs independently of main or other processes.
9.What are the different types of classes in C#?
Answer:
1.Partial class --- Allows its members to be divided or shared with multiple .cs files. It is denoted by the keyword Partial.
2.Sealed class-- It is a class which cannot be inherited. To access the members of a sealed class,
we need to create the object of the class. It is denoted by the keyword Sealed.
3.Abstract class-- It is a class whose object cannot be instantiated. The class can only be
inherited. It should contain at least one method. It is denoted by the keyword abstract.
4.Static class-- It is a class which does not allow inheritance. The members of the class are also static.
It is denoted by the keyword static. This keyword tells the compiler to check for any accidental instances of the static class.
10.What are the different validators in ASP.NET?
Answer:
ASP.NET validation controls define an important role in validating the user input data.
Whenever the user gives the input, it must always be validated before sending it across to various
layers of an application. If we get the user input with validation, then chances are that we are sending
the wrong data. So, validation is a good idea to do whenever we are taking input from the user.
There are the following two types of validation in ASP.NET:
Client-Side Validation
Server-Side Validation
11.What are the fundamental OOP concepts?
Answer:
1.Encapsulation –
The Internal representation of an object is hidden from the view outside
object’s definition. Only the required information can be accessed whereas the rest of the data implementation is hidden.
2.Abstraction --
It is a process of identifying the critical behavior and data of an object and eliminating the irrelevant details.
3.Inheritance--
It is the ability to create new classes from another class. It is done by accessing, modifying and extending the behavior of objects in the parent class.
4.Polymorphism --
The name means, one name, many forms. It is achieved by having multiple methods with the same name but different implementations.
12.What is .net Framwork
Answer:
The .Net framework is a software development platform developed by Microsoft.
framework was meant to create applications, which would run on the Windows Platform.
The first version of the .Net framework was released in the year 2002.
The version was called the .Net framework 1.0. The .Net framework has come a long way since then, and the current version is 4.7.1.
As noted in an earlier section, a developer can develop an application in a variety of .Net programming languages. 1. Language - The first level is the programming language itself, the most common ones are VB.Net and C#.
2.Compiler – There is a compiler which will be separate for each programming language. So underlying the VB.Net language,
there will be a separate VB.Net compiler. Similarly, for C#, you will have another compiler.
3.Common Language Interpreter – This is the final layer in .Net which would be used to run a .net program developed in any programming language.
So the subsequent compiler will send the program to the CLI layer to run the .Net application.
13.What is “using” statement in C#?
Answer:
“Using” Keyword denotes that the particular namespace is being used by the program.
using System. Here System is a namespace. The class Console is defined under System
So we can use the console.writeline (“….”) or readline in our program.
14.What is a Generic Class?
Answer:
Generics or Generic class is used to create classes or objects which do not have any specific
data type. The data type can be assigned during runtime, i.e when it is used in the program.
15.What is Ajax in ASP.NET?
Answer:
Ajax stands for Asynchronous JavaScript and XML; in other words Ajax is the combination of
various technologies such as a JavaScript, CSS, XHTML, DOM, etc.
AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the
server behind the scenes. This means that it is possible to update parts of a web page, without
reloading the entire page.
With AJAX, when a user clicks a button, you can use JavaScript and DHTML to immediately update the UI, and spawn an asynchronous
request to the server to fetch results.
When the response is generated, you can then use JavaScript and CSS to update your UI
accordingly without refreshing the entire page. While this is happening, the form on the users
screen doesn't flash, blink, disappear, or stall.
16.What is an Abstract Class?
Answer:
An Abstract class is a class which is denoted by abstract keyword and can be used only as a
Base class. An Abstract class should always be inherited. An instance of the class itself cannot be
created. If we do not want any program to create an object of a class, then such classes can be made abstract.
Any method in the abstract class does not have implementations in the same class. But they must be implemented in the child class.
Example:
abstract class AB1
{
Public void Add();
}
Class childClass : AB1
{
childClass cs = new childClass ();
int Sum = cs.Add();
}
17.What is an Interface?
Answer:
An Interface is a class with no implementation. The only thing that it contains
is the declaration of methods, properties, and events.
c basic programming list follow this link https://qnainterviewa.blogspot.com/2019/09/top-c-programming-examples-with-output.html
No comments:
Post a Comment