How to use another/multiple ScriptManager in other page using MasterPage which MasterPage has a Scri

Posted by prakashmondal5-21103 under ASP.NET AJAX on 5/23/2014 | Points: 10 | Views : 865 | Status : [Member] | Replies : 2
Design Page (MasterPage.master):
here, I use a ScriptManager, Panel (black colored) and a button. And also use Ajax ModalPopupExtender1.

Source Code (MasterPage):

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%@ Register Assembly ="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="pm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder id="head" runat="server">
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Details"
onclick="Button1_Click" />
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
<pm:ModalPopupExtender id="ModalPopupExtender1" BackgroundCssClass="bgcolor" TargetControlID="Button8" PopupControlID="Panel1" runat="server" >
<asp:Button ID="Button8" runat="server" Text="Log In" style="display:none" />
<asp:ScriptManager ID="ScriptManager1" runat="server">
<asp:Panel ID="Panel1" runat="server" Width="500px">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
Code View(MasterPage):
protected void Button1_Click(object sender, EventArgs e)
Source View (Default3.aspx)

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<asp:Button ID="Button9" runat="server" onclick="Button9_Click" Text="Button" />
<asp:ScriptManager ID="ScriptManager2" runat="server">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

Code View (Default3.aspx.cs)
protected void Button9_Click(object sender, EventArgs e)
Label1.Text = "Hello";

Run (Show Error):
"The COntrol with ID 'UpdatePanel1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it."
Then I add a ScriptManager on Default3.aspx page within UpdatePanel1.
Then Again Run:
Error: Only one instance of a ScriptManager can be added to the page.
Please solve this problem whereas I use multiple ScriptManager in another page using MasterPage (where already use ScriptManager).
For check Attachment remove .zip from (


Posted by: Vuyiswamb on: 5/23/2014 [Member] [MVP] [Administrator] NotApplicable | Points: 25

What is your problem?

Thank you for posting at Dotnetfunda

prakashmondal5-21103, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: prakashmondal5-21103 on: 5/23/2014 [Member] Starter | Points: 25

Hi! Vuyiswamb [Administrator],

I update my question again..........
Please check it and also attach file... just remove .zip from (

prakashmondal5-21103, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response