allanmark
asked on
ScriptManagerProxy and MasterPages
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
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
ASKER
Page does run.
What is the remaining issue? If the page runs then .net is correctly picking up your scriptmanagerproxy.
ASKER
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.
ASKER
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??!!
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??!!
Are all the issues resolved?
ASKER
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!!
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!!
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.
ASKER
For this particular application, the requirements are very diferent for each of several page, which happen to have a similair layout (hence the MasterPage).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Didn't work for me.
The issue of "Element 'ScriptManagerProxy' is not a known element" error could be a bunch of stuff. Does the page run?