If you’re preparing for ASP.NET AJAX job interview and whether you’re experienced or fresher & don’t know what kind of questions will be asked in ASP.NET AJAX interview, then go through the below 50+ Top ASP.NET AJAX Interview Questions and Answers to crack your job interview.
ASP.NET AJAX Interview Questions and Answers
Question: Briefly Describe Asp.net Ajax Framework?
Question: Can We Nest The Updatepanel Controls?
Yes, we can nest the UpdatePanel control.
Question: Describe Ajax Control Extender Toolkit?
Question: 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.
Question: Describe The Situations In Which Ajax Should Not Be Used?
You should not use AJAX if:
- You want to create a secure application.
Question: 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.
- Response time may be slow because different controls of a page are loaded at different time.
Question: 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.
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.
Question: Explain The Step Property Of The Numericupdownextender Control?
The Step property sets the steps for numeric increment and decrement. The default value is 1.
Question: 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.
Question: 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.
Question: 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.
Question: How Many Validation Controls Are Available In Asp.net Ajax 4.0?
The following validation controls are available in ASP.NET AJAX 4.0:
- FilteredTextBoxExtender – Enables you to apply filtering to a text box.
- MaskedEditExtender and MaskedEditValidator – Restricts a user to enter only a certain pattern of characters in the TextBox by applying a mask to the input.
- 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.
- 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.
- PasswordStrengthExtender – Measures the strength of the password text entered within the text box by validating with the different strength specified parameters
Question: Is It Possible To Use Multiple Scriptmanager Controls On A Web Page?
No, it is not possible.
Question: 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.
Question: 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.
Question: List The Different States Of Xmlhttprequest With Their Description?
The different states of the XMLHttpRequest object are as follows:
- Uninitialized – Refers to the state when the object has not been initialized.
- Open – Refers to the state when the object has been created; however, the send function has not been invoked.
- Sent -Refers to the state when the send function is invoked; however, the status and headers are not available.
- Receiving – Refers to the state when the process is receiving data.
- Loaded – Refers to the state when the procedure is completed and the entire data is available.
Question: 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.
Question: What Are The Different Controls Of Asp.net Ajax?
ASP.NET AJAX includes the following controls:
Question: 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:
Get: XmlHttpObject.Open(“GET”, “file1.txt”, true);
Post: XmlHttpObject.Open(“POST”, “file2.txt”, true);
Question: What Are The Extender Controls?
Question: 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:
SeaDragonExtender control – Refers to the control that is used to deeply zoom the images. You can zoom in or out the image or the particular portion of the image by using the mouse. You can also create a menu over the Seadragon control. This control is helpful when you want to analyze the image closely.
AsyncFileUploadExtender control – Refers to the control that provides the facility to upload and save the files on the server asynchronously. You can check the outcome either at the server or client side.
Question: What Are The New Features Included In The Microsoft Ajax Library?
The new features included in the Microsoft AJAX library are as follows:
- Imperative syntax – Supports simple imperative syntax that is used to create and manage controls.
- 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.
- Client data access – Supports to access client data and display by client data control and client template.
- Client datacontext – Supports read and write permission to data from a database.
- The AdoNetDataContext class – Enables you to easily interact with an ADO.NET Data Services service.
- 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.
Question: 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:
- Support for live data binding.
- Support for client-side template rendering.
- Support for declarative instantiation of client components.
- Support for invoking ADO.NET data services and data contexts.
- Support for the DataView control.
Question: 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.
Question: 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.
Question: 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.
Question: 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.
Question: What Is Json?
Question: What Is The Difference Between Synchronous Postback And Asynchronous Postback?
The difference between synchronous and asynchronous postback is as follows:
- Asynchronous postback renders only the required part of the page; whereas, synchronous postback renders the entire page for any postback.
- 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.
- Asynchronous postback only modifies the update panel that raises the postback; whereas, synchronous postback modifies the entire page.
Question: 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.
Question: 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.
Question: 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.
Question: What Is The Use Of The Scriptmanager Control In Ajax?
Question: 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.
Question: What Technologies Are Being Used In Ajax?
AJAX uses four technologies, which are as follows:
- Document Object Model (DOM)
- Extensible HTML (XHTML) and Cascading Style Sheets (CSS)
Question: 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.
Question: Why Do We Use The Xmlhttprequest Object In Ajax?