ASP.Net Interview Questions and Answers

    16 Votes

32) What is side-by-side execution?

This means multiple version of same assembly can run on the same computer. This feature will enable to deploy multiple versions of the component.

33) What is application domain?

It is the process space within which the application will be running. Every application has its own process space which isolates it from other application. If one of the application domain throws error, it does not affect the other application domains.

34) What is impersonation in ASP.NET?

ASP.NET executes in the security context of a restricted user account on the local machine. Sometimes, we need to access network resources such as a file on a shared drive, which will require additional permissions. One way to restrict this, is to use impersonation. ASP.NET with impersonation can execute the request using the identity of the client or ASP.NET can impersonate a specific account by the values in web.config.

35) How many types of validation controls are provided by ASP.NET ?

There are FIVE types of validators in ASP.NET and they are –

  • RequiredFieldValidator - It checks whether the control have any value or not. It is used, when you want the control not to be empty.
  • RangeValidator - It checks, if the value in validated control is in that specific range. Eg: Range of Date Birth.
  • CompareValidator - It checks that the value in controls should match the value in other control. Eg : Password and Retype Passwords.
  • RegularExpressionValidator - When we want the control value that matches a specific regular expression. Eg : Checking for valid Email ID.
  • CustomValidator - It is used to define User Defined validation.

36) What does AspCompat="true" mean and when should you use it?

The AspCompat attribute forces the page to execute in STA mode. ASP.NET runtime throws an exception, if the compatibility tag is omitted and an STA component is referenced in the page. If you convert the STA component to an assembly using Tlbimp.exe, runtime does not detect that the component uses the STA model and does not throw an exception, but the application can suffer from poor performance.

<%@Page AspCompat=true Language = C# %>

37) What are HttpHandlers?

ASP.NET programming supports the creation of custom HttpHandler components, which provide an efficient way to process requests that don't return standard HTML-based pages.

E.g. : HttpHandler components are good for situations in which you want to return XML, simple text or binary data to the user.

The easiest way to create a custom HttpHandler component is to create a source file with an .ashx extension. You must then add a @WebHandler directive to the top of the .ashx file with a class definition that implements the IHttpHandler interface.

38) Explain the differences between Server-side and Clientside code?

  • Server side code is executed at the server side on IIS in ASP.NET framework, these code will be written either in C#, VB.NET or VC++.
  • Client side code is executed on the browser. JavaScript is the typical example for this.

39) What is Custom Control in ASP.NET?

Custom controls are compiled code, which makes them easier to use but difficult to create one. Once you have created the control, we can add it to the Toolbox and display it in a visual designer. We can deploy custom control in GAC and can be shared between the applications. This is either extended from Control/WebControl class.

40) What is User Control in ASP.NET?

User controls are easy to build, but they are less convenient to use in complicated scenarios. User controls are developed in the same way as we develop Web Forms pages in the visual designer. User controls can handle execution events.

41) What’s a bubbled event?

When you have a complex control, like GridView, writing an event processing routine for each object like cell, button, row, etc. is tedious. The controls can bubble up their event handlers, allowing the main GridView event handler to take care of its constituents.

42) What is ASP.NET Compilation Tool?

The ASP.NET Compilation tool enables you to compile an ASP.NET application either In-place or for deployment to a target location. In-place compilation always helps application performance, because end users do not encounter a delay on the first request to the application while the application is compiled. Compilation for deployment can be done in one of two ways: one that removes all source files, such as code behind files and markup files, or one that always retains the markup files.

43) What is the basic difference between ASP and ASP.NET?

The basic difference between ASP and ASP.NET is that, ASP.NET is compiled whereas ASP is interpreted whereas. This implies that since ASP mainly uses VBScript, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).

44) In which event, controls will be fully loaded?

Page load event guarantees that all controls are fully loaded. Controls are accessed in Page_Init event, but you will see that view state is not fully loaded during this event.

45) What is the difference between a default skin and a named skin?

The default skin is applied to all the Web server controls in a Web form and it does not provide a Skin ID attribute. The named skin provides an attribute Skin ID and users have to set the Skin ID property to apply it.

Page 3 of 10

Popular Videos


How to improve your Interview, Salary Negotiation, Communication & Presentation Skills.

Got a tip or Question?
Let us know

Related Articles

C# Interview Questions
.Net Framework Interview Questions and Answers
ADO.Net Interview Questions and Answers for Freshers, Experienced
ASP.Net MVC Interview questions and Answers
WCF Interview Questions and Answers
ASP.Net Web API Interview Questions
Top 50 Entity framework interview questions & answers