Solved

ScriptManagerProxy and MasterPages

Posted on 2009-03-30
12
2,093 Views
Last Modified: 2012-08-14
Greetings all,

I have an Ajax-enabled web ap. Each MasrePage created has by default a ScriptManager on it.

On the content pages I would like to make use of UpdatPanels. I dragged a ScriptMangerProxy to the page (inside the ContentspLaceHolder) but get an error, "Element 'ScriptManagerProxy' is not a known element. This can occur if there is a compilation error in the Web site (there are no errors, prior to adding the scriptmanageproxy.

1.  What am I missing?
2.  Also, if there are 2 contentplaceholders o Masterpage, then I will need one
    scriptprooxymanager inside each of those, on the content page - is this correct?

In advance, thanks?

   allanmark
0
Comment
Question by:allanmark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 9

Expert Comment

by:cdaly33
ID: 24022894
First, a ScriptManagerProxy should only appears once during the rendering of a page.  Therefore, if you have one in your MasterPage then that should be plenty.

The issue of "Element 'ScriptManagerProxy' is not a known element" error could be a bunch of stuff.  Does the page run?
0
 

Author Comment

by:allanmark
ID: 24023007
Page does run.
0
 
LVL 9

Expert Comment

by:cdaly33
ID: 24023041
What is the remaining issue?  If the page runs then .net is correctly picking up your scriptmanagerproxy.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:allanmark
ID: 24023116
Please see atatched Jpg.

How do I clear this up?
Err.jpg
0
 
LVL 9

Expert Comment

by:cdaly33
ID: 24023267
Thanks for the pic.  That does help.  My first idea is what happens when you just put the scriptmanagerproxy in the masterpage?  In the past when VS has had trouble picking up the tags I've closed down VS and deleted the temp asp.net compilation files.  These would normally be located in "c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\".  Just delete the project for that folder and reopen the project.
0
 

Author Comment

by:allanmark
ID: 24023414
Ok.

I closed down the app, deleted the folder, re-opened the app and added the SCriptManagerProxy - same thing.
 
Your first idea - added the proxy to the MasterPage -- worked:

<div id="header">
      <!-- Header start -->                                  
              <asp:ScriptManager ID="ScriptManager1" runat="server">
          </asp:ScriptManager>          
        <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        </asp:ScriptManagerProxy>
      ...................
     ....................
     
NOTE THE ID TAG WHICH WASN"T PRESENT WHEN I ADDED TO THE CONTENT PAGE??!!


   

0
 
LVL 9

Expert Comment

by:cdaly33
ID: 24023579
Are all the issues resolved?
0
 

Author Comment

by:allanmark
ID: 24023697
No.

If the MasterP{age has a ScriptManager, you wouldn't need to add a SCriptManagerProxy to it.

Without a valid ScriptManagerProxy on the Content page, I can't add an UpdatePanel -- which I need to do!!

0
 
LVL 9

Expert Comment

by:cdaly33
ID: 24023768
I'm not sure why you need an update panel on the Content page.  Normally having a ScriptManager or ScriptManagerProxy in the Masterpage is good enough.  I've never needed to add them anywhere except the Masterpage.
0
 

Author Comment

by:allanmark
ID: 24023840
For this particular application, the requirements are very diferent for each of several page, which happen to have a similair layout (hence the MasterPage).
0
 

Accepted Solution

by:
allanmark earned 0 total points
ID: 24037605
An answer!!

      <system.web>
            <pages>
                  <controls>
                        <add tagPrefix="ASP" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

CHANGED TO

                        <add tagPrefix="ajaxext" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
0
 
LVL 2

Expert Comment

by:navyjax2
ID: 26350393
Didn't work for me.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual Studio hangs on running project 6 62
VS2010 Build fails to install 14 82
Exception when using Alea null reference in fsharp.core.dll 3 53
ASP sending two datas 2 23
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question