ASP.NET AJAX interview question

25. 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 theScriptManagerProxy 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:

  • You want the page to show in a search engine, such as Google, because WebCrawler does not execute JavaScript code.
  • The browser does not support JavaScript.
  • You want to create a secure application.
Leave a Reply0

Your email address will not be published.