1. 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.
2. What is the difference between synchronous postback and asynchronous postback?
The difference between synchronous and asynchronous postback is as follows:
3. What technologies are being used in AJAX?
AJAX uses four technologies, which are as follows:
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:
7. 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:
8. Explain the Step property of the NumericUpDownExtender control.
The Step property sets the steps for numeric increment and decrement. The default value is 1.
9. 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:
10. 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 UpdatePanelcontrols for partial-page rendering.
The UpdateProgress control makes you aware of the status information about the partial-page updates in the UpdatePanel control.
11. 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.
12. How many validation controls are available in ASP.NET AJAX 4.0?
The following validation controls are available in ASP.NET AJAX 4.0:
13. Explain the limitations of AJAX.
The following are the limitations of AJAX:
14. What are the differences between AJAX and JavaScript?
The differences between AJAX and JavaScript are given as follows:
15. 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.
16. 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.
17. 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.
18. 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.
19. 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.
20. What are the components of the ASP.NET AJAX architecture?
You can divide the ASP.NET AJAX architecture into two components - AJAX client architecture and AJAX server architecture.
21. 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.
22. Explain the need of the Timer control in AJAX.
The Timer control is used with an UpdatePanel control to allow partial-page updates at a specified interval. It is mostly used when a periodically partial-page update for one or more UpdatePanel controls is required without refreshing the entire page.
The Timer control is a server control that sets a JavaScript component in the Web page. The intervalproperty of the Timer control specifies time in milliseconds. Similar to the UpdatePanel control, the Timercontrol also requires an instance of the ScriptManager control in the Web page.
When the Timer control initiates a postback, the Tick event is raised on the server for which you can provide an event handler to perform the actions when the page is submitted to the server. The Tick event occurs when the time specified in the interval property has elapsed and the page is posted on the server. You can add one or more Timer controls on a Web page. Usually the entire page requires only a single Timer control; however, you can use multiple Timer controls, if the UpdatePanel controls are being updated at different intervals.
23. List the different states of XMLHttpRequest with their description.
The different states of the XMLHttpRequest object are as follows:
24. Can we nest the UpdatePanel controls?
Yes, we can nest the UpdatePanel control.
25. What is the role of the ScriptManagerProxy control?
A Web page cannot contain more than one ScriptManager control. You can use the ScriptManagerProxycontrol 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.
26. 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.
27. 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.
28. Is there any difference between HTML and XHTML?
Extensible HTML (XHTML) is a markup language that provides the mixture expressions of HTML and XML. XHTML is a flexible markup language that enables automated processing by standard XML tools, which was difficult in HTML.
29. What are the requirements to run ASP.NET AJAX applications on a server?
AJAX is a built-in functionality of .NET Framework 4.0. Therefore, you can run an AJAX application by just installing Microsoft Visual Studio 2010. However, to use extenders in your applications, you are required to install AJAX Control Toolkit and copy the AjaxControlToolkit.dll file to the Bin directory of your application.
30 Describe the situations in which AJAX should not be used.
You should not use AJAX if:
31. What is the use of the ScriptManager control in AJAX?
The ScriptManager control is a core control that performs a key role in implementing the ASP.NET AJAX functionality. It helps to use JavaScript for the Microsoft AJAX Library. It should be noted that AJAX Library on a Web page can only be used if the Web page contains the ScriptManager control. This control makes use of the ScriptManager class to maintain the AJAX script libraries and script files. It allows for partial page rendering, Web service calls, and use of ASP.NET AJAX Client Library by rendering the AJAX Library scripts to the browser.
32. How can you find out that an AJAX request has been completed?
You can find out that an AJAX request has been completed by using the readyState property. If the value of this property equals to four, it means that the request has been completed and the data is available.
33. Is it possible to use multiple ScriptManager controls on a Web page?
No, it is not possible.
34. What are the new controls introduced in ASP.NET AJAX Control Toolkit?
The following controls are introduced with the new version of AJAX Control Toolkit:
35. Briefly describe ASP.NET AJAX Framework.
ASP.NET AJAX Framework provides a platform where developers can develop such type of applications that use the AJAX concept. The AJAX provides the collection of technologies to create dynamic pages at the client side. The JavaScript requests are responsible to retrieve data from the server or send data to the server. Even some processing at server also requires handling requests, such as searching and storing of data. These tasks are achieved more easily using the AJAX Framework.
AJAX Framework is completely devoted to process requests. The objective of the AJAX engine is to reduce the delays that the user notices while performing a postback to the server. AJAX Framework allows JavaScript functions to send requests to server at the client side. On the other side, it allows the server to process the client's request, searches data, and responds the result to the browser.
36. Is the AjaxControlToolkit.dll file installed in the Global Assembly Cache?
No, you have to copy this file to the Bin folder of your application.
37. What are the different ways to pass parameters to the server?
We can pass parameters to the server using either the GET or POST method. The following code snippets show the example of both the methods:
38. What are the extender controls?
The extender controls uses a block of JavaScript code to add new and enhanced capabilities to ASP.NET. The developers can use a set of sample extender controls through a separate download - AJAX Control Toolkit (ACT).
39. Describe the AccordionExtender control.
The AccordionExtender control is similar to the CollapsiblePanelExtender control. It allows you to group multiple collapsible panels in a single control. At the same time, it also manages the collapsed and expanded state of each panel; therefore, expanding one panel at a time. In other words, the AccordionExtender control does not support expanding two or more panels simultaneously. Instead, the header templates of all the panels are always visible so that you can click on any of them to display the hidden contents. By default, the AccordionExtender control opens with one panel as expanded.
85 docs|57 tests
|
|
Explore Courses for Interview Preparation exam
|