Tuesday, November 20, 2012

Business development interview questions

You can use these sample interview questions or discussion topics to get a better idea of a candidate’s grasp of ASP.NET. While you still have to determine if the person’s personality fits within your organization, you can at least get an idea of their technical skills.

What are page directives?

The first line of an ASP.NET page is the page directive; you will find it on all ASP.NET pages. These directives are instructions for the page. It begins with the @Page directive and continues with the various attributes available to this directive.
It’s unreasonable to expect a candidate to know all of these attributes, but a few popular ones include the following.
  • AutoEventWireup: Indicates whether page events are autowired.
  • CodeBehind: The name of the compiled class associated with the page.
  • Debug: Indicates whether the page is compiled in debug mode (includes debug symbols).
  • EnableTheming: Indicates whether themes are used on the page.
  • EnableViewState: Indicates whether view state is maintained across pages.
  • ErrorPage: Specifies a target URL to be used when unhandled exceptions occur.
  • Language: Indicates the language used when compiling inline code on the page.
  • Trace: Signals whether tracing is enabled on the page.

What is a master page?

A master page is a template for one or more Web Forms. The master page defines how the page will be laid out when presented to the user, with placeholders for content. The MasterPageFile Page Directive in a content page’s header is one way to assign a master page. The content pages rely solely on content and leave layout to the master page. ASP.NET merges the content with the master page layout when the content page is requested by a user.

What is the code behind feature of ASP.NET?

The code behind feature divides ASP.NET page files into two files where one defines the user interface (.aspx), while the other contains all of the logic or code (.aspx.cs for C# and .aspx.vb for VB.NET). These two files are glued together with page directives like the following line, which ties the page to the specific code behind class.
<%@ Page language="c#" Codebehind="UICode.cs" Inherits="Library.UICode" %>

What are ASHX files?

ASP.NET Web handler files have an .ashx file extension. Web handlers work just like .aspx files except you don’t have to deal with the browser interface, thus no worrying about presentation. Web handlers are generally used to generate content dynamically like returning XML or an image. Web handlers use the IHttpHandler interface with the ProcessRequest() method invoked when the handler is requested. Web handlers are simpler than pages (fewer events and wiring), so they are ideal for performance-critical applications.

No comments:

Post a Comment