Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should i place the scriptmanager

Tags:

asp.net

I am planning to rebuilding the code of one asp.net project to another asp.net project.

but i am stuck some where ...

I drag and dropped the master page and the views (4 nos) into the master page.

now i need to drop scriptmanager.. where should i need to drag and drop this?

  • inside the multiview
  • outside the multiview
  • inside view? if so which view ? view 1 ? view 2? view 3? view 4?

What actually the script manager do ?

like image 929
SmartestVEGA Avatar asked Mar 23 '10 15:03

SmartestVEGA


People also ask

What is ScriptManager How will you use it?

ScriptManager is a server-side control that sits on your Web Form and enables the core of ASP.NET AJAX. Its primary role is the arbitration of all other ASP.NET AJAX controls on the Web Form and the addition of the right scripting libraries to the Web browser so that the client portion of ASP.NET AJAX can function.

Can we use more than one ScriptManager in your web page?

The ScriptManagerProxy works in a similar fashion as the ScriptManager control. You can have multiple ScriptManagerProxy item in a page. This helps you to add custom scripts or a Webservice proxy only when needed.

How many ScriptManager control can be added on a asp net web page?

A page can contain only one ScriptManager control in its hierarchy.


2 Answers

Thomas answer is correct, I'd like to add, to be more specific that placing the ScriptManager right below the Master's page Form tag is the best place:

<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
like image 81
Ricardo Sanchez Avatar answered Sep 30 '22 14:09

Ricardo Sanchez


I would put the ScriptManager at the top of the Master page outside of any Multi-View. The ScriptManager is a what is used by the Microsoft controls to provide AJAX functionality.

like image 21
Thomas Avatar answered Sep 30 '22 13:09

Thomas