Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

Explain the difference between SQL invalidation and SQL notification.

Answer»

SQL invalidation directly invalidates the data present in the cache when a change is applied in the database that is copied to cache EARLIER. COMPARED to this, SQL notification triggers only when there is a change in the data that is MADE a copy in the cache.

2.

What are the cookies types in ASP.NET?

Answer»

ASP.NET has two types of COOKIES:

  • PERSISTENT COOKIE: PRESENTS on a user’s machine for a SPECIFIED period of its expiry
  • Session Cookie: presents on the client machine for only a single session, until the user doesn’t log out.
3.

Explain weak typing and strong typing.

Answer»

In weak typing, the variable DATA types are CHECKED at runtime, whereas in strong typing, the data types of variable are checked at compile TIME. There is no chance of COMPILATION error in strong typing.

4.

Is it possible to apply themes to an ASP.NET application?

Answer»

YES, it is possible to apply themes to an ASP.NET application. Developers can specify them in the web.config file with FOLLOWING SYNTAX:

<CONFIGURATION>

<system.web>

<pages THEME="Windows7">

</system.web>

</configuration>

5.

What is role-based security in ASP.NET?

Answer»

This process is used to IMPLEMENT security based on roles assigned to different user GROUPS in an organization. We can ALLOW or deny permissions to users based on their organizational ROLE.

6.

Explain the difference between the web config and machine config.

Answer»

MACHINE config is severed SPECIFIC, whereas web config is specific to a web application. Only ONE machine config file can be PRESENT on a SERVER, but multiple web config files can be implemented into an application.

7.

What is syntax code to send email from an ASP.NET application?

Answer»

Developers use the following SYNTAX code to SEND email from an ASP.NET application:

 

  • MailMessagemailMess = new MailMessage ();
  • mailMess.From = "[email protected]uestion.com"
  • mailMess.To = "[email protected]"
  • mailMess.Subject = "Test email";
  • mailMess.Body = "Hi This is a test mail for bestinterviewquestion.";
  • SmtpMail.SmtpServer = "LOCALHOST";
  • SmtpMail.Send (mailMess);
8.

Explain the use of fragment caching.

Answer»

Fragment caching is used to cache a portion of a target page instead of the WHOLE page. The target portion can be generated by REQUEST. For this, developers can create a control with the below syntax:

&LT;%@ OutputCache Duration="120" VaryByParam="CategoryID;SelectedID"%>

9.

Explain cashing in ASP.NET.

Answer»

The caching technique is used to INCREASE performance level in ASP.NET by keeping frequently accesses FILES or DATA in memory. The request for a cached data/file will be directly OBTAINED from the cache instead of the ACTUAL location of that data or file.

 

ASP.NET has three types of caching:

  • Data Caching
  • Fragment Caching
  • Output Caching
10.

What is ViewState?

Answer»

It is used to RETAIN the state of the server-SIDE objects between PAGE postbacks. After the page postback, it is STORED in a hidden field on the page at the client side. It is transported to both client and server side, and not stored on the server or any other EXTERNAL source.

11.

What is an ASP.NET validator? And, mention its types.

Answer»

An ASP.NET VALIDATOR controls validate the user INPUT data. Whenever the user shares an input, it MUST validate them before sending it ACROSS various layers of the application.

 

There are two types of validation USED in ASP.NET:

  • Client-side validation
  • Server-side validation
12.

Mention few ASP.NET validators.

Answer»

Here are the few most USED ASP.NET validators by DEVELOPERS:

  • REQUIRED Field Validator
  • Range Validator
  • Compare Validator
  • Summary Validator
  • Regular EXPRESSION Validator
  • Custom Validator
13.

What’s the difference between Response .Redirect and Server.Transfer?

Answer»

SERVER.Transfer sends INFORMATION from one web request to ANOTHER on the server SIDE, But, Response.Redirect sends an HTTP 302 MESSAGE to the browser and implements a redirect in the browser.

14.

Explain the ASP.NET session state modes.

Answer»

There are five primary SESSION state modes PRESENT in ASP.NET.

  • InProc MODE – Stores session state in the web server memory
  • StateServer Mode – Stores session in ASP.NET state service
  • SQLServer Mode – Store the session state in a SQL database
  • Custom Mode – DEVELOPERS can SPECIFY the storage provider here
  • Off Mode – Completely disables the session state
15.

4. What’s the difference between ASP.NET Web Forms and ASP.NET MVC?

Answer»

Both ASP.NET Web Forms and MVC are tolls with different strengths and workability. Web Forms are USED to CREATE web apps with ASP.NET and utilize designer and server controls to design a FORM with a point and CLICK interface, whereas VMS is used to separate as web APP into data, actions and display.

16.

Explain the ASP.NET page life cycle.

Answer»

An ASP.NET page goes through a series of stages in the life cycle as FOLLOWING,

 

Page REQUEST => START => Initialization => LOAD =>Postback Event Handling => Rendering => UNLOAD

17.

What is IIS? Why is it used?

Answer»

Internet INFORMATION SERVER or IIS is developed by Microsoft with its own OPERATING system. It is used to execute web page scripts. It works in between ASP.NET engine and browser to process chrome requests and RESPONSES are submitted BACK.

18.

Explain the difference between ASP & ASP.NET.

Answer»

The prime difference between these two is that ASP is interpreted platform as SCRIPTS are being used, whereas ASP.NET is a compiled platform because of its pages using .NET languages. All the ASP.NET pages are MSIL (Microsoft Intermediate Language) compiled.