ASP.NET AJAX Interview Questions – Part I

Posted by: Suprotim Agarwal , on 8/4/2008, in Category Interview Questions
Views: 176318
Abstract: The ASP.NET AJAX Interview Questions contains the most frequently asked questions in ASP.NET AJAX. These lists of questions will gauge your familiarity with the ASP.NET AJAX platform.
ASP.NET AJAX Interview Questions – Part I
 
The ASP.NET AJAX Interview Questions contains the most frequently asked questions in ASP.NET AJAX. These lists of questions will gauge your familiarity with the ASP.NET AJAX platform.
What is Ajax?
The term Ajax was coined by Jesse James Garrett and is a short form for "Asynchronous Javascript and XML". Ajax represents a set of commonly used techniques, like HTML/XHTML, CSS, Document Object Model(DOM), XML/XSLT, Javascript and the XMLHttpRequest object, to create RIA's (Rich Internet Applications).
Ajax gives the user, the ability to dynamically and asynchronously interact with a web server, without using a plug-in or without compromising on the user’s ability to interact with the page. This is possible due to an object found in browsers called the XMLHttpRequest object.
What is ASP.NET AJAX?
‘ASP.NET AJAX’ is a terminology coined by Microsoft for ‘their’ implementation of AJAX, which is a set of extensions to ASP.NET. These components allow you to build rich AJAX enabled web applications, which consists of both server side and client side libraries.
Which is the current version of ASP.NET AJAX Control Toolkit?
As of this writing, the toolkit version is Version 1.0.20229 (if you are targeting Framework 2.0, ASP.NET AJAX 1.0 and Visual Studio 2005) and Version 3.0.20229 (if targeting .NET Framework 3.5 and Visual Studio 2008).
What role does the ScriptManager play?
The ScriptManager manages all ASP.NET AJAX resources on a page and renders the links for the ASP.NET AJAX client libraries, which lets you use AJAX functionality like PageMethods, UpdatePanels etc. It creates the PageRequestManager and Application objects, which are prominent in raising events during the client life cycle of an ASP.NET AJAX Web page. It also helps you create proxies to call web services asynchronously.
Can we use multiple ScriptManager on a page?
No. You can use only one ScriptManager on a page.
What is the role of a ScriptManagerProxy?
A page can contain only one ScriptManager control. If you have a Master-Content page scenario in your application and the MasterPage contains a ScriptManager control, then you can use the ScriptManagerProxy control to add scripts to content pages.
Also, if you come across a scenario where only a few pages in your application need to register to a script or a web service, then its best to remove them from the ScriptManager control and add them to individual pages, by using the ScriptManagerProxy control. That is because if you added the scripts using the ScriptManager on the Master Page, then these items will be downloaded on each page that derives from the MasterPage, even if they are not needed, which would lead to a waste of resources.
What are the requirements to run ASP.NET AJAX applications on a server?
You would need to install ‘ASP.NET AJAX Extensions’ on your server. If you are using the ASP.NET AJAX Control toolkit, then you would also need to add the AjaxControlToolkit.dll in the /Bin folder.
Note: ASP.NET AJAX 1.0 was available as a separate downloadable add-on for ASP.NET 2.0. With ASP.NET 3.5, the AJAX components have been integrated into ASP.NET.
Explain the UpdatePanel?
The UpdatePanel enables you to add AJAX functionality to existing ASP.NET applications. It can be used to update content in a page by using Partial-page rendering. By using Partial-page rendering, you can refresh only a selected part of the page instead of refreshing the whole page with a postback.
Can I use ASP.NET AJAX with any other technology apart from ASP.NET?
To answer this question, check out this example of using ASP.NET AJAX with PHP, to demonstrate running ASP.NET AJAX outside of ASP.NET. Client-Side ASP.NET AJAX framework can be used with PHP and Coldfusion.
How can you cancel an Asynchronous postback?
Yes you can. Read my article over here.
Difference between Server-Side AJAX framework and Client-side AJAX framework?
ASP.NET AJAX contains both a server-side Ajax framework and a client-side Ajax framework. The server-side framework provides developers with an easy way to implement Ajax functionality, without having to possess much knowledge of JavaScript. The framework includes server controls and components and the drag and drop functionality. This framework is usually preferred when you need to quickly ajaxify an asp.net application. The disadvantage is that you still need a round trip to the server to perform a client-side action.
The Client-Side Framework allows you to build web applications with rich user-interactivity as that of a desktop application. It contains a set of JavaScript libraries, which is independent from ASP.NET. The library is getting rich in functionality with every new build released.
 How can you debug ASP.NET AJAX applications?
Explain about two tools useful for debugging: Fiddler for IE and Firebug for Mozilla.
Can we call Server-Side code (C# or VB.NET code) from javascript?
Yes. You can do so using PageMethods in ASP.NET AJAX or using webservices.
Can you nest UpdatePanel within each other?
Yes, you can do that. You would want to nest update panels to basically have more control over the Page Refresh.
How can you to add JavaScript to a page when performing an asynchronous postback?
Use the ScriptManager class. This class contains several methods like the RegisterStartupScript(), RegisterClientScriptBlock(), RegisterClientScriptInclude(), RegisterArrayDeclaration(),RegisterClientScriptResource(), RegisterExpandoAttribute(), RegisterOnSubmitStatement() which helps to add javascript while performing an asynchronous postback.
Explain differences between the page execution lifecycle of an ASP.NET page and an ASP.NET AJAX page?
In an asynchronous model, all the server side events occur, as they do in a synchronous model. The Microsoft AJAX Library also raises client side events. However when the page is rendered, asynchronous postback renders only the contents of the update panel, where as in a synchronous postback, the entire page is recreated and sent back to the browser.
Explain the AJAX Client life-cycle events
Here’s a good article about the same.
Is the ASP.NET AJAX Control Toolkit(AjaxControlToolkit.dll) installed in the Global Assembly Cache?
No. You must copy the AjaxControlToolkit.dll assembly to the /Bin folder in your application.
 Those were some frequently asked questions you should have knowledge about. In one of the coming articles, we will cover some more ASP.NET AJAX FAQ’s which were not covered in this article. I hope this article was useful and I thank you for viewing it.
If you liked the article,  Subscribe to my RSS Feed or Subscribe Via Email
 
Give a +1 to this article if you think it was well written. Thanks!
Recommended Articles
Suprotim Agarwal, ASP.NET Architecture MVP, MCSD, MCAD, MCDBA, MCSE, is the CEO of A2Z Knowledge Visuals Pvt. He primarily works as an Architect Consultant and provides consultancy on how to design and develop .NET centric database solutions.

Suprotim is the founder and primary contributor to DotNetCurry, DNC .NET Magazine, SQLServerCurry and DevCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls. and is authoring another one at The Absolutely Awesome jQuery CookBook.

Follow him on twitter @suprotimagarwal


Page copy protected against web site content infringement by Copyscape


User Feedback
Comment posted by ash on Tuesday, August 5, 2008 7:55 AM
cool collection
Comment posted by jaisree on Wednesday, August 6, 2008 4:49 PM
very good.
Comment posted by ganesh on Thursday, August 7, 2008 7:38 AM
thanks!!

Nice set of questions... :)


i also find really heplful asp.net FAQs on following link...

http://aspnet35.blogspot.com

and also many other topics like project management, Sharepoint 2007 and many more

http://msvs2008.blogspot.com

http://bugsolutions.blogspot.com
Comment posted by Dinesh Verma on Thursday, August 14, 2008 3:33 PM
Nice Collections. But I need Step By Step AJAX tutorial with Practicle Examples..Can u help me plz
Comment posted by anver sadat on Thursday, August 28, 2008 2:30 AM
its a niceful and beautiful knowledge based article . got a chance to know abt ajax in depth. continue ur journey to share ur knowledge with us.
a once again i m very thankful to for this knowledhe plenty conatiner
Comment posted by Satya on Sunday, September 14, 2008 10:37 AM
I have gone through all Q&A really this material is good and most useful for me.
Great job dude!
It was really useful.
thanks a lot.
Regards,
satya
Comment posted by Deepti on Monday, October 13, 2008 9:02 AM
Gr8 articles which provide knowledge and are useful to all the professionals
Comment posted by jsip123 on Sunday, October 19, 2008 7:06 AM
I really like this website. It provides me lot of information on .Net.
This site contains easy ways to collect required information.
This site is really a very helpfull to clarify doubts.
Thank You very much.
Comment posted by ravi on Tuesday, October 28, 2008 7:24 AM
its a niceful and beautiful knowledge based article
Comment posted by Saranya on Tuesday, November 25, 2008 12:50 AM
very nice collections. Good KB article for AJAX.
Comment posted by venkat on Monday, December 8, 2008 9:39 AM
Very nice... and useful, good collection
Comment posted by naveen on Monday, December 8, 2008 11:14 PM
sfsdf
Comment posted by ilakkiakeerthana on Tuesday, January 6, 2009 9:59 AM
i see all the information its very useful please send lot of information about .net(c#,vb,asp)
Comment posted by ilakkia on Tuesday, January 6, 2009 10:00 AM
i see all the information its very useful please send lot of information about .net(c#,vb,asp)
Comment posted by Irfan on Thursday, January 8, 2009 11:55 PM
very nice..
Comment posted by guru on Monday, January 12, 2009 6:18 AM
Really good collection.this is very useful for us.could u send ajax mini projects.once again thanks a lot.
                                     guru
Comment posted by pramod on Wednesday, January 14, 2009 1:07 PM
It's a very good collection, I like this collection.............keep on
Comment posted by Bharat Sisode on Thursday, January 22, 2009 2:07 AM
Very Nice question set realy usefull
Comment posted by sdf on Friday, February 27, 2009 7:07 AM
sdf
Comment posted by Ravi on Monday, March 2, 2009 11:23 PM
this is very good question.
Comment posted by radhey Shaym on Tuesday, March 17, 2009 7:22 AM
fundoo........
Comment posted by Arun on Wednesday, April 22, 2009 10:19 AM
It's very nice collections.
Thanks
Arun

Comment posted by Prerak Shah on Thursday, April 30, 2009 9:49 PM
Nice collection... Thanks :)
Comment posted by janees on Tuesday, May 12, 2009 12:23 AM
It's better in the best for asp.net ajax beginners.i am really thankful to authoer to get a kind idea about AJAX
Comment posted by Anandu4u on Friday, May 22, 2009 7:58 AM
Great..............
Thanks
Comment posted by Shuaib Kaniyar on Tuesday, June 2, 2009 3:28 AM
good collection...
Comment posted by Mukesh on Saturday, June 20, 2009 1:01 PM
Thanks...good questions
Comment posted by vijai on Tuesday, July 7, 2009 5:57 AM
Nice example ....
Comment posted by rajkumar on Monday, July 27, 2009 5:56 AM
very good question....keep update with latest questions
Comment posted by johnson on Tuesday, July 28, 2009 12:39 PM
Thanks...good example
Comment posted by ja on Tuesday, October 20, 2009 1:34 AM
very nice, here is another series of interview QAs
http://jack-fx.com/csharp/post/aspnet-interview-questions-and-answers-csharp.htm
http://jack-fx.com/csharp/post/38-interview-questions-and-answers-of-aspnet.htm
http://jack-fx.com/csharp/post/c-interview-questions-and-answers.htm
Comment posted by rahul on Wednesday, December 23, 2009 4:49 AM


First of all. Thanks very much for your useful post.

I just came across your blog and wanted to drop you a note telling you how impressed I was with the

information you have posted here.

Please let me introduce you some info related to this post and I hope that it is useful for community.

There is a good C# resource site, Have alook

http://CSharpTalk.com

Thanks again
Rahul
Comment posted by Suresh on Monday, January 11, 2010 4:16 AM
Thanks a lot
Good one

Regards:)
Suresh Sanga
Comment posted by kalyan on Monday, April 19, 2010 3:34 AM
Great simple and precise collection....
Comment posted by pradeep.kasar on Tuesday, May 18, 2010 12:28 PM
Thanks
This is pretty helpful
Comment posted by ddd on Wednesday, July 21, 2010 11:52 PM
good
Comment posted by rajesh on Monday, August 30, 2010 3:31 AM
why ajax used in asp.net
Comment posted by Nishikant Shinde on Sunday, October 24, 2010 2:56 AM
Thanks.
Good one...
Comment posted by jami sateesh kumar on Monday, December 20, 2010 10:34 PM
good collection
thank you........
Comment posted by RAM on Thursday, March 3, 2011 6:28 AM
its very useful..
Comment posted by Rathika on Sunday, May 1, 2011 12:51 PM
very good collection..........its very useful for freshers
Comment posted by viji on Wednesday, July 27, 2011 3:44 AM
thank you so much.very useful and easy to understand.
Comment posted by Dexter on Thursday, July 28, 2011 9:33 AM
If you want to know more questions on C# please vist this site
<a href="http://www.interviewforit.com/csharp.aspx">C# Interview Questions</a>
Comment posted by Kapil Singh on Wednesday, November 23, 2011 8:51 AM
Check this link for more interview question and answer on Ajax...
http://www.mindstick.com/Interviewer/QuestionPage.aspx?topicid=12&topic=AJAX
Comment posted by sunny on Saturday, June 16, 2012 12:01 PM
Great Listing Thanks for Sharing.

Here i found some more interesting ajax interview questions
http://codershelpdesk.com/2012/06/16/ajax-interview-questions-part-i/
Comment posted by Subramanyam on Wednesday, June 20, 2012 12:52 AM
good collection
thank you........
Comment posted by eonejames on Monday, July 2, 2012 6:26 AM
Thansk to share such a wonderful collection.....
Comment posted by Rathana on Thursday, December 20, 2012 6:08 AM
very nice articles
Comment posted by Abhijit on Friday, January 4, 2013 9:41 PM
Very helpful for me
Thank
Comment posted by Proteinsindia on Wednesday, May 8, 2013 2:19 AM
Nice and beautiful knowledge based article on Asp.Net and AJAX thank!!
Comment posted by ajay on Thursday, May 15, 2014 6:41 AM
hai friends....
at any where have interview for dotnet platform please intimate me (varanasi.ajaykumar476@gmail.com) tq friends...

Post your comment
Name:  
E-mail: (Will not be displayed)
Comment:
Insert Cancel