AJAX Interview Question and Answer

What is Asp.net Ajax?

ASP.NET AJAX, mostly called AJAX, is a set of extensions of ASP.NET. It is developed by Microsoft to implement AJAX functionalities in Web applications. ASP.NET AJAX provides a set of components that enable the developers to develop applications that can update only a specified portion of data without refreshing the entire page. The ASP.NET AJAX works with the AJAX Library that uses object-oriented programming (OOP) to develop rich Web applications that communicate with the server using asynchronous postback.

What is the difference between synchronous postback and asynchronous postback?

The difference between synchronous and asynchronous postback is as follows:

  1. Asynchronous postback renders only the required part of the page; whereas, synchronous postback renders the entire page for any postback.
  2. Asynchronous postback executes only one postback at a time, that is, if you have two buttons doing asynchronous postback, the actions will be performed one by one; whereas, synchronous postback executes all the actions at once.
  3. Asynchronous postback only modifies the update panel that raises the postback; whereas, synchronous postback modifies the entire page.

What are the new features included in the Microsoft AJAX library?

The Microsoft AJAX library is a client-based JavaScript library that is compatible with all modern browsers and offers a lot of functionality as compared to JavaScript. This library is released with new features and fully supports ASP.NET 4.0'. The new features included in the Microsoft AJAX library are as follows:

  1. Imperative syntax - Supports simple imperative syntax that is used to create and manage controls.
  2. Script loader - Retrieves all scripts that are needed by one or more client component or control automatically and executes the scripts in the order in which they are received.
  3. Client data access - Supports to access client data and display by client data control and client template.
  4. Client datacontext - Supports read and write permission to data from a database.
  5. The AdoNetDataContext class - Enables you to easily interact with an ADO.NET Data Services service.
  6. jQuery integration - Helps to access the elements in your Web pages, work with client-side events, enable visual effects, and make it easier to use AJAX in your applications.
What is JSON?

JSON is an abbreviation of JavaScript Object Notation. It is a safe and reliable data interchange format in JavaScript, which is easy to understand not only for the users but also for the machines.

What technologies are being used in AJAX?

AJAX uses four technologies, which are as follows:

  1. JavaScript
  2. XMLHttpRequest
  3. HTML
  4. CSS

Why do we use the XMLHttpRequest object in AJAX?

The XMLHttpRequest object is used by JavaScript to transfer XML and other text data between client and server. The XMLHttpRequest object allows a client-side script to perform an HTTP request. AJAX applications use the XMLHttpRequest object so that the browser can communicate to the server without requiring a postback of the entire page. In earlier versions of Internet Explorer, MSXML ActiveX component is liable to provide this functionality; whereas, Internet Explorer 7 and other browsers, such as Mozilla Firefox, XMLHttpRequest is not liable to.

How can we get the state of the requested process?

XMLHttpRequest get the current state of the request operation by using the readyState property. This property checks the state of the object to determine if any action should be taken. The readyState property uses numeric values to represent the state.

What are the different controls of ASP.NET AJAX?

ASP.NET AJAX includes the following controls:

  1. ScriptManager
  2. ScriptManagerProxy
  3. UpdatePanel
  4. UpdateProgress
  5. Timer
Explain the Step property of the NumericUpDownExtender control.

The Step property sets the steps for numeric increment and decrement. The default value is 1.

What are the new features of ASP.NET AJAX 4.0?

ASP.NET 4.0 AJAX includes several new features that provide more functionality to a user. These features are as follows:

  1. Support for live data binding.
  2. Support for client-side template rendering.
  3. Support for declarative instantiation of client components.
  4. Support for using the observer pattern on JavaScript objects and arrays.
  5. Support for invoking ADO.NET data services and data contexts.
  6. Support for the DataView control.

Why do we use the UpdateProgress control in AJAX?

The UpdateProgress control is somewhat related to the UpdatePanel control. The UpdateProgress control enables you to design a user-friendly interface when a Web page consists of a number of UpdatePanel controls for partial-page rendering.
The UpdateProgress control makes you aware of the status information about the partial-page updates in the UpdatePanel control.

How many validation controls are available in ASP.NET AJAX 4.0?

The following validation controls are available in ASP.NET AJAX 4.0:

  1. FilteredTextBoxExtender - Enables you to apply filtering to a text box.
  2. MaskedEditExtender and MaskedEditValidator - Restricts a user to enter only a certain pattern of characters in the TextBox by applying a mask to the input.
  3. ValidatorCalloutExtender - Attaches to the ASP.NET validators so that the error messages are not displayed as a simple text but as a balloon-style ToolTip.
  4. NoBot - Prevents the spam/bot from filling the input forms automatically and uses the Completely Automated Public Turing test to tell Computers and Humans Apart (CAPTCHA), which is a type of challenge-response test to ensure that the response is not generated by the computer.
  5. PasswordStrengthExtender - Measures the strength of the password text entered within the text box by validating with the different strength specified parameters

1 Komentar untuk "AJAX Interview Question and Answer"

Back To Top