ASP.Net interview questions for fresher/ASP.Net Interview Questions and Answers for Freshers & Experienced

What is the difference between session object and application object?

The session object is used to maintain the session of each user. A session id is generated if a user enters in the application and when the user leaves the application, the session id is automatically deleted.

On the other hand, the application object is used to store the information and access variables from any page in the application.

Posted Date:- 2021-09-17 02:54:47

What is a multilingual website?

If a website provides content in many languages, it is known as a multilingual website. It contains multiple copies of its content and other resources, such as date and time, in different languages.

Posted Date:- 2021-09-17 02:53:17

What is the usage of IIS?

Following are the main usage of IIS:

IIS is used to make your computer to work as a Web server and provides the functionality to develop and deploy Web applications on the server.
IIS handles the request and response cycle on the Web server.
IIS also offers the services of SMTP and FrontPage server extensions.
The SMTP is used to send emails and use FrontPage server extensions to get the dynamic features of IIS, such as form handler.

Posted Date:- 2021-09-17 02:52:19

What is IIS?

IIS stands for Internet Information Services. It is created by Microsoft to provide Internet-based services to ASP.NET Web applications.

Posted Date:- 2021-09-17 02:51:16

What is CAS?

CAS stands for code access security, CAS is a part of a security model that prevents unauthorized access to the resources. It also enables the users to set permissions for the code. CLR then executes the code depending upon the permissions.

Posted Date:- 2021-09-17 02:50:16

What is the REST architecture?

REST stands for REpresentational State Transfer.REST is an architectural style that doesn’t follow any strict standard but follows six constraints defined by Roy Fielding in 2000. Those constraints are – Uniform Interface, Client-Server, Stateless, Cacheable, Layered System, Code on Demand.REST is not restricted to XML and it’s the choice of implementer which Media-Type to use like XML, JSON, Plain-text. Moreover, REST can use SOAP protocol but SOAP cannot use REST.REST is easy to implement and requires less bandwidth such as smartphones.

Architectural Constraints of RESTful API: There are six architectural constraints that make any web service are listed below:

Uniform Interface
Stateless
Cacheable
Client-Server
Layered System
Code on Demand

Posted Date:- 2021-09-17 02:48:55

What is Razor in ASP.NET?

In ASP.NET, Razor provides the syntax for developing dynamic web pages with the help of C# and HTML. ASP.NET can be integrated with JS(JavaScript) and it also includes the frameworks like React and Angular for the SPA(Single Page Application.)

Posted Date:- 2021-09-17 02:47:43

What is Round Trip in ASP.NET?

At the point when server-side processing is included, then there are four stages included:

1. A user requests a Web form from the Web server.
2. Web Server reacts back with the mentioned Web form.
3. The user enters the information and submits the webform to the webserver.
4. Then Web Server processes the form structure and sends the outcomes back to the particular user.

Posted Date:- 2021-09-17 02:46:41

What do you know about JIT?

Just-In-Time(JIT) Compiler: Just-In-Time compiler(JIT) is a part of Common Language Runtime (CLR) in .NET which is responsible for managing the execution of .NET programs regardless of any .NET programming language. A language-specific compiler converts the source code to the intermediate language. This intermediate language is then converted into the machine code by the Just-In-Time (JIT) compiler. This machine code is specific to the computer environment that the JIT compiler runs on.

Posted Date:- 2021-09-17 02:45:32

What is caching?

Caching simply means storing the data temporarily in the memory so that the data can be accessed from the memory instead of searching for it in the original location. It increases the efficiency of the application and also increases its speed.

Following are the types of caching:

Page caching
Data caching
Fragment caching

Posted Date:- 2021-09-17 02:43:58

What is a garbage collector?

Garbage collector feature in .NET frees the unused code objects in the memory. The memory head is divided into 3 generations:

* Generation 0: It stores short-lived objects.
* Generation 1: This is for medium-lived objects.
* Generation 2: It stores long-lived objects.

Collection of garbage refers to the collection of objects stored in the generations.

Posted Date:- 2021-09-17 02:19:05

What are MDI and SDI?

<> MDI( Multiple Document Interface): An MDI lets you open multiple windows, it will have one parent window and as many child windows. The components are shared from the parent window like menubar, toolbar, etc.

<> SDI( Single Document Interface): It opens each document in a separate window. Each window has its own components like menubar, toolbar, etc. Therefore it is not constrained to the parent window.

Posted Date:- 2021-09-17 02:18:12

What does “PostBack” mean in ASP.NET?

A PostBack is the process of presenting an ASP.NET page to the server for processing. PostBack is done if certain credentials of the page are to be checked against certain sources, (for example, confirmation of username and secret key/password using a database). This is something that a client machine can not able to achieve and subsequently, these details must be ‘posted back’ on the server. So we can say that a postback event occurs on the client-side but is handled by the code in a copy of the page running on the server.

Posted Date:- 2021-09-17 02:15:51

Describe application state management in ASP.NET?

Application Level State Management is used to maintain the state of all the users accessing the web forms present within the website. The value assigned for an application is considered as an object. Application object will not have any default expiration period. Whenever the webserver has been restarted or stopped then the information maintained by the application object will be lost. If any data is stored on the application object then that information will be shared upon all the users accessing the webserver. Since the information is shared among all the users, it is advisable to lock and unlock the application object as per requirement. Global Application Class(Global.asax) It is a Class which consists of event handlers which executes the code implicitly whenever a relevant task has been performed on the web server.

Posted Date:- 2021-09-17 02:15:00

What are the different types of constructors in c#?

Following are the types of constructors in C#:

<> Default Constructor
<> Parameterized constructor
<> Copy Constructor
<> Static Constructor
<> Private Constructor

Posted Date:- 2021-09-17 02:13:37

Which would be the right framework to be used ASP.NET MVC or ASP.NET Web API?

If one intends to build a server component that can be easily utilized by an array of clients then ASP.NET Web API is the way to go. If, however, the project is purely going to be used as a web application, then ASP.NET MVC is a more appropriate choice.

Posted Date:- 2021-09-17 02:12:23

What is authentication and authorization in ASP.NET?

* Authentication: Prove genuineness
* Authorization: process of granting approval or permission on resources.

In ASP.NET authentication means to identify the user or in other words it's nothing but validating that he exists in your database and he is the proper user. Authorization means does he have access to a particular resource on the IIS website. A resource can be an ASP.NET web page, media files (MP4, GIF, JPEG etc), compressed file (ZIP, RAR) etc.

Posted Date:- 2021-09-17 02:11:32

How long the items in ViewState exists?

They exist for the life of the current page.

Posted Date:- 2021-09-17 02:10:25

What is MSIL?

MSIL is the Microsoft Intermediate Language, it provides instructions for calling methods, storing and initializing values, memory handling, exception handling and so on. All the .NET codes are first compiled to Intermediate Language.

Posted Date:- 2021-09-17 02:10:00

What is Server control?

It is an acronym for Language integrated query which was introduced with visual studio 2008. LINQ is a set of features that extend query capabilities to the .NET framework language syntax that allows data manipulation irrespective of the data source. LINQ bridges the gap between the world of objects and the world of data.

Posted Date:- 2021-09-17 02:08:09

What is Server control?

It is an acronym for Language integrated query which was introduced with visual studio 2008. LINQ is a set of features that extend query capabilities to the .NET framework language syntax that allows data manipulation irrespective of the data source. LINQ bridges the gap between the world of objects and the world of data.

Posted Date:- 2021-09-17 02:07:44

What is the difference between namespace and assembly?

An assembly is a physical grouping of logical units whereas namespace groups classes. Also, a namespace can span multiple assemblies as well.

Posted Date:- 2021-09-17 02:05:55

Where the viewstate is stored after the page postback?

ViewState is stored in a hidden field on the page at client side. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.

Posted Date:- 2021-09-17 02:05:00

Where the viewstate is stored after the page postback?

ViewState is stored in a hidden field on the page at client side. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.

Posted Date:- 2021-09-17 02:04:51

What are the components of the web form in ASP.NET?

Here is the brief of components of web forms in ASP.NET:

Server controls: They are Hypertext Markup Language (HTML) elements that contain a runat=server attribute. These components provide automatic state management as well as server-side events and react to the user events by implementing an event handler on the server. HTML controls: They also respond to the related user events but the events processing takes place on the client machine.

Data controls: Data controls enable connection to the database, run command, and access data from a database.

System components: They offer access to system-level events that take place on the server.

Posted Date:- 2021-09-17 02:01:45

What is BCL?

<> BCL is a base class library of classes, interfaces and value types
<> It is the foundation of .NET framework applications, components, and controls
<> Encapsulates a huge number of common functions and make them easily available for the developers
<> It provides functionality like threading, input/output, security, diagnostics, resources, globalization, etc.
<> Also serves the purpose of interaction between user and runtime
<> It also provides namespaces that are used very frequently. for eg: system, system.Activities, etc.

Posted Date:- 2021-09-17 02:01:06

What are the various validators in ASP.NET?

RequiredFieldValidator: This validator is used when you don’t want the container to stay empty. It examines whether the control possesses any value or not.

RangeValidator: It finds out whether the value in validated control falls the specific range or not. CompareValidator: It tests if the value in controls matches certain specific values or not. RegularExpressionValidator: Tests if the particular value matches an explicit regular expression or not.

CustomValidator: Useful for defining User Defined validation.

Summary Validation: Shows summary of all existing validation errors over an ASP.NET page.

Posted Date:- 2021-09-17 01:49:30

What is dependency injection?

Dependency injection represents a design pattern that assists to develop loosely coupled code. It is this pattern which is widely used in ASP.NET. The purpose of using Dependency injection is to provide the objects what they need in the particular object’s constructor instead of needing that object to construct them.

Dependency injection decreases and usually removes needless unnecessary dependencies between those objects that don’t require knowing one another. Also, it assists in testing by hitting out the dependencies at runtime.

Posted Date:- 2021-09-17 01:47:56

What is the difference between Response.Redirect and Server.Transfer?

Response.Redirect basically redirects the user’s browser to another page or site. The history of the user’s browser is updated to reflect the new address as well. It also performs a trip back to the client where the client’s browser is redirected to the new page.

Whereas, Server.Transfer transfers from one page to the other without making any round-trip back to the client’s browser. The history does not get updated in the case of Server.Transfer.

Posted Date:- 2021-09-17 01:46:13

Why do we use Response.Output.Write()?

Response.Output.Write() is used to get the formatted output.

Posted Date:- 2021-09-17 01:45:49

What is a Kestrel?

Kestrel is an open-source type cross-platform web server uniquely designed for ASP.NET Core. It is incorporated and enabled by default in ASP.NET Core. Moreover, it can be utilized as a web server processing requests straight from a network.

Posted Date:- 2021-09-17 01:45:16

How is the Startup class useful in ASP.NET?

This class deals with two significant aspects of your application. They are service registration and middleware pipeline.

Two methods involved in startup class are ConfigureServices() and Configure().

Posted Date:- 2021-09-17 01:44:54

How is the Program class useful in ASP.NET?

Program.cs class signifies the entry point of our application. Any ASP.NET application begins identically as a console application, directly from a static void Main() function. It is this class that configures the web host which would serve the requests.

Posted Date:- 2021-09-17 01:43:51

What is the NuGet package manager?

NuGet is a package manager dedicated to the .NET ecosystem. Essentially, Microsoft developed it to offer access to thousands of packages being written by .NET developers. Also, you can use it for sharing the code you already wrote with others.

A classic web application being developed through ASP.NET depends on several open-source NuGet packages to work. One of the famous NuGet package managers is Newtonsoft.Json. It is used for working with JSON data in .NET.

Posted Date:- 2021-09-17 01:43:28

What is the MVC pattern in ASP.NET?

The Model-View-Controller (MVC) represents an architectural pattern that splits an application into 3 key logical components. The names of these components are the model, the view, and the controller. Keep in mind that this pattern is not related to the layered pattern. Essentially, the MVC pattern runs on the software side.

In a particular application that implements the MVC pattern, every component comes with its role dedicated. To understand better, for example, model classes merely hold the data as well as the business logic. These classes don’t deal with the HTTP requests but they view only display information. Moreover, the controllers deal with and respond to user input and determine which model to be passed to which view. Doing this makes an application simple to develop and maintain as it expands in complexity.

Posted Date:- 2021-09-17 01:42:53

What are the different modes for the Session state in ASP.NET?

There are following the different mode of session state which can be defined in a Web.config file.

Off: Specify that Session state is not enabled.

InProc: This is the default mode of the session. In this mode session state is stored on the web server i.e. IIS where an application is running.

OutProc: The OutProc mode can be handled by using the following ways -

* State Server: In this mode, the session is stored in a separate process called ASP.NET state service. This ensures that the session state will be available if the web application is restarted. This way also makes the session state availability to multiple web servers in a web farm.

* SQL Server: In this mode, the session is stored in a SQL Server database. This also ensures that the session state will be available if the web application is restarted. This way also makes the session state availability to multiple web servers in a web farm.

Posted Date:- 2021-09-17 01:42:18

What is Neutral Culture, Culture, and Language?

A neutral culture is a culture that is associated with a language but not with a country or region. For example, "en" for English and in for Hindi. Culture consists of language and the country or region. It is denoted by culture code which contains two lowercase letters denoting the language and two uppercase letters denoting the country or region like as en-US for English in the US, en-GB for UK etc. A language is any spoken language like English (en), Hindi (hi), and German (de) etc.

Posted Date:- 2021-09-17 01:37:14

What is a Resource File?

ASP.NET provides resource files to implement globalization and localization. The resource file is an XML file having extension resx. Each resource in the resx file is in the form of a key-value pair. For each culture which your application needs to support create a separate resource file. For example, WebResources.en.resx is a resource file for English language and WebResources.hi.resx is a resource file for the Hindi language.

Posted Date:- 2021-09-17 01:36:49

What is the Web.config file in ASP?

Configuration file is used to manage various settings that define a website. The settings are stored in XML files that are separate from your application code. In this way you can configure settings independently from your code. Generally a website contains a single Web.config file stored inside the application root directory. However there can be many configuration files that manage settings at various levels within an application. Usage of configuration file ASP.NET Configuration system is used to describe the properties and behaviors of various aspects of ASP.NET applications. Configuration files help you to manage the settings related to your website. Each file is an XML file (with the extension .config) that contains a set of configuration elements. Configuration information is stored in XML-based text files. Benefits of XML-based Configuration files

<> ASP.NET Configuration system is extensible and application specific information can be stored and retrieved easily. It is human-readable.
You need not restart the web server when the settings are changed in configuration files. <> ASP.NET automatically detects the changes and applies them to the running ASP.NET application.
<> You can use any standard text editor or XML parser to create and edit ASP.NET configuration files.

Posted Date:- 2021-09-17 01:35:58

What are the concepts of Globalization and Localization in .NET?

Localization means "the process of translating resources for a specific culture", and Globalization means "the process of designing applications that can adapt to different cultures".

Proper Globalization Your application should be able to Accept, Verify, and Display all kinds of global data. It should well also be able to operate over this data, accordingly.
Localizability and Localization Localizability stands for clearly separating the components of culture-based operations regarding the user interface, and other operations from the executable code.
.NET framework has greatly simplified the task of creating the applications targeting the clients of multiple cultures. The namespaces involved in creation of globalize, localizing applications are,

<> System.Globalization
<> System.Resources
<> System.Text

Posted Date:- 2021-09-17 01:35:16

What is the difference between client-side and server-side validations?

Client-side validations work at the client end with the help of scripting languages such as JavaScript or jQuery and VBScript. On the other hand, server-side validations work at the server end with the help of programming languages like C#, VB, F# etc. Server validations work when you submit or send data to the server.

Posted Date:- 2021-09-17 01:31:15

How many navigation controls are in ASP.NET?

There are three navigation controls in ASP.NET.

* SiteMapPath

* Menu

* TreeView

Posted Date:- 2021-09-17 01:30:54

What are navigation controls?

Navigation controls help us to navigate in a Web application easily. These controls store all the links in a hierarchical or drop-down structure; thereby facilitating easy navigation in a Web application.

Posted Date:- 2021-09-17 01:30:11

What is the difference between Hyperlink and LinkButton?

Hyperlink control does not have the Click and Command events; whereas the LinkButton control has these events, which can be handled in the code-behind file of the Web page.

Posted Date:- 2021-09-17 01:29:51

What are server controls in ASP.NET?

The ASP.NET server controls are objects on the ASP.NET pages that run when the Web page is requested. Many server controls, such as button and text box, are similar to the HTML controls. In addition to the HTML controls, there are many controls, which include complex behaviour, such as the controls used to connect to data sources and display data.

Posted Date:- 2021-09-17 01:29:34

When do you choose classic ASP.NET over ASP.NET Core?

Though it’s a better choice in almost all the aspects, you don’t have to switch to ASP.NET Core if you are maintaining a legacy ASP.NET application that you are happy with and that is no longer actively developed.
ASP.NET MVC is a better choice if you:

<> Don’t need cross-platform support for your Web app.
<> Need a stable environment to work in.
<> Have nearer release schedules.
<> Are already working on an existing app and extending its functionality.
<> Already have an existing team with ASP.NET expertise.

Posted Date:- 2021-09-17 01:28:13

What is a Global.asax file?

The Global.asax file has been derived from the HttpApplication class. The Global.asax file is used to add application-level logic and processing. It does neither handles any UI related processing, nor it does support individual requests. It basically controls the following events.

* Application_Start

* Application_End

* Session_Start

* Session_End

Following are the important aspect of the use of the Global.asax file.

* The code in the Global.asax is compiled when the web application is built for the first time.

* Session level code and variables can be declared in Application_Start event.

* Application level events are for the entire application and may be used for any user.

* Session level events are user specific for the length of a session.

Posted Date:- 2021-09-17 01:27:12

What is a round trip?

The trip of a Web page from the client to the server and then back to the client is known as a round trip. In ASP.NET Response.Redirect() causes a round trip.

Posted Date:- 2021-09-17 01:25:16

What is View State?

View State is the method to preserve the Value of the Page and Controls between round trips. It is a Page-Level State Management technique. View State is turned on by default and normally serializes the data in every control on the page regardless of whether it is actually used during a post-back.

A web application is stateless. That means that a new instance of a page is created every time when we make a request to the server to get the page and after the round trip our page has been lost immediately

Features of View State These are the main features of view state,

1. Retains the value of the Control after post-back without using a session..
2. Stores the value of Pages and Control Properties defined in the page.
3. Creates a custom View State Provider that lets you store View State Information in a SQL Server Database or in another data store.

Advantages of View State

1. Easy to Implement.
2. No server resources are required: The View State is contained in a structure within the page load.
3. Enhanced security features: It can be encoded and compressed or Unicode implementation.

Posted Date:- 2021-09-17 01:24:06

What are the different validators in ASP.NET?

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
Client-Side Validation

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. Server-Side Validation 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

Posted Date:- 2021-09-17 01:22:46

What is ASP.NET?

ASP.NET is Microsoft's framework to build Web applications. ASP.NET is a part of .NET Framework. ASP.NET and Web Forms are used to build the front end and in the backend, C# langauge is used. ASP.NET runs on a Web Server, IIS.

Posted Date:- 2021-09-17 01:21:41

Search
R4R Team
R4R provides ASP.Net Freshers questions and answers (ASP.Net Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,ASP.Net interview questions for fresher,ASP.Net Freshers & Experienced Interview Questions and Answers,ASP.Net Objetive choice questions and answers,ASP.Net Multiple choice questions and answers,ASP.Net objective, ASP.Net questions , ASP.Net answers,ASP.Net MCQs questions and answers R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for ASP.Net fresher interview questions ,ASP.Net Experienced interview questions,ASP.Net fresher interview questions and answers ,ASP.Net Experienced interview questions and answers,tricky ASP.Net queries for interview pdf,complex ASP.Net for practice with answers,ASP.Net for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .