AJAX



1. What technologies are being used in AJAX?  

AJAX uses four technologies, which are as follows: * JavaScript * XMLHttpRequest * Document Object Model (DOM) * Extensible HTML (XHTML) and Cascading Style Sheets (CSS)


2. 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.


3. What is the difference between synchronous postback and asynchronous postback?  


4. 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.



5. 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.


6. What are the different controls of ASP.NET AJAX?  

ASP.NET AJAX includes the following controls: * ScriptManager * ScriptManagerProxy * UpdatePanel * UpdateProgress * Timer


7. Explain the Step property of the NumericUpDownExtender control.  

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


8. 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.


9. Explain the limitations of AJAX.  

The following are the limitations of AJAX: * It is difficult to bookmark a particular state of the application. * Function provided in the code-behind file do not work because the dynamic pages cannot register themselves on browsers history engine automatically. * If JavaScript is disabled, then AJAX is not able to perform any work. * Response time may be slow because different controls of a page are loaded at different time.


10. What are the differences between AJAX and JavaScript?  

The differences between AJAX and JavaScript are given as follows: * AJAX sends request to the server and does not wait for the response. It performs other operations on the page during that time. JavaScript make a request to the server and waits for response. * AJAX does not require the page to refresh for downloading the whole page while JavaScript manages and controls a Web page after being downloaded. * AJAX minimizes the overload on the server since the script needs to request once while JavaScript posts a request that updates the script every time.


11. Explain the UpdatePanel control.  

The UpdatePanel control specifies the portions of a Web page that can be updated together. As the UpdatePanel control refreshes only a selected part of the Web page instead of refreshing the entire page with a postback, you get more flexibility to create rich and client-centric Web applications. Refreshing a selected part of the Web page is referred as partial-page update. You can add one or more UpdatePanel control in the Web page, which automatically participates in partial-page update without custom client script. The UpdatePanel control uses the UpdatePanel class to support the partial-page rendering.


12. What does the DynamicPopulateExtender control do?  

The DynamicPopulateExtender control populates the contents of a control dynamically. It enables you to send an asynchronous call to the server that dynamically populates the contents of a control. The DynamicPopulateExtender control replaces the contents of a control with the result of a Web service or page method call.


13. What does the MinimumPrefixLength property of the AutoCompleteExtender control do?  

The MinimumPrefixLength property sets the minimum number of characters that must be entered before getting suggestions from the Web service.


14. What is the importance of client-side libraries?  

Client-side libraries contain built-in code to make asynchronous calls over XMLHTTP. These libraries automatically handle browser compatibility issues. These libraries are based on a programming model similar to ASP.NET.


15. Can we call server-side code from JavaScript?  

Yes, page methods and Web services are the two techniques to call the server-side code from JavaScript.


16. Describe AJAX Control Extender Toolkit.  

AJAX Control Toolkit is a set of extenders that are used to extend the functionalities of the ASP.NET controls. The extenders use a block of JavaScript code to add new and enhanced capabilities to the ASP.NET controls. AJAX Control Toolkit is a free download available on the Microsoft site. You need to install this toolkit on your system before using extenders.


17. Can we nest the UpdatePanel controls?  

  • A) YES
  • B) NO


18. What is the role of the ScriptManagerProxy control?  

A Web page cannot contain more than one ScriptManager control. You can use the ScriptManagerProxy control to add scripts to other pages; however to perform such an operation, you need to work with a master page that contains the ScriptManager control. If you have only few pages that need to register to a script or a Web service, then you should remove these pages from the ScriptManager control and add them as individual pages by using the ScriptManagerProxy control. If you include the scripts on the master page by the ScriptManager control, then the items get downloaded on each page that extends the master page, even if they are not necessary.


19. What is the work of the ConformOnFormSubmit property in the ConfirmButtonExtender control?  

The ConformOnFormSubmit property determines whether or not the confirm dialog box should wait when the form is submitted for display.


20. What is the syntax to create AJAX objects?  

AJAX uses the following syntax to create an object: var myobject = new AjaxObject("page path"); The page path is the URL of the Web page containing the object that you want to call. The URL must be of the same domain as the Web page.


.Net Interview Question

PHP Interview Question

Java Interview Question

AngularJS Interview Questions