ASP.NET AJAX - ASP.NET (MCQ) questions and answers

Here, you can read ASP.NET AJAX multiple choice questions and answers with explanation.

1)   What is jQuery?

1. jQuery is an open source library
2. It works client side.
3. jQuery is java technology.

- Published on 31 Aug 15

a. 1, 2
b. 1, 2, 3
c. 1, 3
d. None of the above
Answer  Explanation 

ANSWER: 1, 2

Explanation:
jQuery is java script library that works on client side. By using jQuery it is much easier to use JavaScript on your website.
The main feature of jQuery is as follows

• HTML / DOM manipulation
• CSS manipulation
• HTML event methods
• Animations
• AJAX


2)   Which interface you will use wrap an AJAX client control into a custom server control?
- Published on 31 Aug 15

a. IScriptManager
b. IScriptControl
c. IScriptAJAX
d. None of the above
Answer  Explanation 

ANSWER: IScriptManager

Explanation:
No explanation is available for this question!


3)   Which method is used to dynamically register client script from code?
- Published on 31 Aug 15

a. Page.ClientScript.RegisterClientScriptBlock
b. RegisterScript
c. Page.ClientScript
d. None of the above
Answer  Explanation 

ANSWER: Page.ClientScript.RegisterClientScriptBlock

Explanation:
Page.ClientScript.RegisterClientScriptBlock method is used to dynamically register client script from code.


4)   AnUpdatePanel control defined on a page. Button control is placed outside of the UpdatePanel. How to cause the UpdatePanel to execute an update.
- Published on 31 Aug 15

a. Set the Trigger attribute of the UpdatePanel to the ID of the Button control.
b. Set the AsyncPostBackTrigger attribute of the Button control to the ID of theUpdatePanel.
c. Place the button control on the update panel without script manager.
d. Add an AsyncPostBackTrigger control to the Triggers section of the UpdatePanel. Set the ControlID attribute of the AsyncPostBackTrigger control to the ID of the Button control.
Answer  Explanation 

ANSWER: Add an AsyncPostBackTrigger control to the Triggers section of the UpdatePanel. Set the ControlID attribute of the AsyncPostBackTrigger control to the ID of the Button control.

Explanation:
To connect a control that is outside an UpdatePanel and you want that this outside control should trigger the update then you should register it as an asyncPostBackTrigger in the Triggers section of the UpdatePanel markup.

<asp:UpdatePanel ID="UpdatePanelVendors" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>


5)   Which control is required for every page that have AJAX Extensions for ASP.NET?
- Published on 31 Aug 15

a. UpdatePanel
b. ScriptManager
c. ContentPanel
d. None of the above
Answer  Explanation 

ANSWER: ScriptManager

Explanation:
ScriptManager control is required for every page that have AJAX Extensions for ASP.NET The ScriptManager control manages the communication between the client page and the server.You can directly drag and drop this control on content page. It does not have a visual representation. It only used to manage AJAX processing. You cannot use more than one ScriptManager control on single web page.

<asp: ScriptManager ID=" ScriptManager1 " runat=" server ">
</asp: ScriptManager>


6)   Which of the following is true ?

1. AJAX is a platform-independent technology
2. AJAX can work with web application
3. AJAX can only work with ASP.NET
4. AJAX is a platform-dependent technology

- Published on 31 Aug 15

a. 1, 2
b. 1,2,3
c. 1,3,4
d. None of the above
Answer  Explanation 

ANSWER: 1, 2

Explanation:
AJAX is a platform-independent technology that works with Web applications. Ajax (Asynchronous JavaScript And XML) enables your client - side web pages to exchange data with the server through asynchronous calls. By using AJAX you can create flicker - free pages that enable you to refresh partial page without a full reload and without affecting other parts of the page.


7)    Match the following List 1 to List 2:
       
a. UpdatePanel ------------------ i. If Master Page contains a ScriptManager then content page will use this control.
b. UpdateProgress -------------- ii. ContentTemplate
c. Timer -------------------------- iii. ProgressTemplate
d. ScriptManagerProxy -------- iv. Tick Event

- Published on 28 Jul 15

a. a - iii b - ii c - iv d - i
b. a - ii b - iii c - iv d - i
c. a - i b - ii c - iv d - iii
d. a - i b - ii c - iii d – iv
Answer  Explanation 

ANSWER: a - ii b - iii c - iv d - i

Explanation:
No explanation is available for this question!


8)   The UpdatePanel supports two types of triggers: AsyncPostBackTrigger and PostBackTrigger. Choose the correct option regarding working of these triggers.
- Published on 28 Jul 15

a. AsyncPostBackTrigger causes an asynchronous (Ajax) postback.
b. PostBackTrigger causes a normal entire-page postback.
c. AsyncPostBackTrigger causes a normal entire-page postback.
d. Option A and B are Correct.
Answer  Explanation 

ANSWER: Option A and B are Correct.

Explanation:
No explanation is available for this question!


9)   Which control is required of every AJAX page to manage the JavaScript files sent to the client and the communication between client and server?
- Published on 28 Jul 15

a. UpdatePanel
b. ScriptManager
c. AsyncPostBackTrigger
d. None of the above.
Answer  Explanation 

ANSWER: ScriptManager

Explanation:
No explanation is available for this question!


10)   You are writing a page that contains an UpdatePanel for partial-page updates. You want that user should get the message “Processing is going on, please wait.” that the update is processing only if the update takes longer than 5 seconds. Which actions should you take?
- Published on 27 Jul 15

a. Add a ProgressBar control to the page. Set the Interval property to 5000. Set the text property as “Processing is going on, please wait.”
b. Add a Timer control to the page. Set the Interval property to 5000. Set its text property to Processing is going on, please wait.”
c. Add an UpdateProgress control to the UpdatePanel. Set its DisplayAfter property to 5000. Set its ProgressTemplate contents to read “Processing is going on, please wait.”
d. None of the above.
Answer  Explanation 

ANSWER: Add an UpdateProgress control to the UpdatePanel. Set its DisplayAfter property to 5000. Set its ProgressTemplate contents to read “Processing is going on, please wait.”

Explanation:
No explanation is available for this question!


1 2