Disable a ScriptManager in the code behind ASP.NET C#
If you are using your controls in jQuery modal windows then in some cases these may cause the ScriptManager to function incorrectly.
You can disable the ScriptManager in the code behind if you place it inside a panel in the front end code:
<asp:Panel ID="pnlScriptManager" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
</asp:Panel>
Then pass a querystring called popup to your controls when opening them in a modal window and use the below code:
//DISABLE SCRIPTMANAGER IF IN POPUP MODE
if(!String.IsNullOrEmpty(Request.QueryString["popup"]))
pnlScriptManager.Visible = false;
else
pnlScriptManager.Visible = true;
Comments
moslem @ 23/07/2011 18:38:52
Very cool. tank you
Hester @ 10/09/2011 12:39:35
Tip top stuff. I'll expcet more now.
xkgbpnrqmn @ 11/09/2011 13:53:59
qEsQ4F , [url=http://pfinghoxlxgz.com/]pfinghoxlxgz[/url], [link=http://ozcmacpqceip.com/]ozcmacpqceip[/link], http://slqmcmwxgixv.com/
fnhkssuvnfq @ 13/09/2011 13:15:02
IyzKxw , [url=http://hdptbvfrmvql.com/]hdptbvfrmvql[/url], [link=http://xtlfkkxrjyov.com/]xtlfkkxrjyov[/link], http://bwscazczpcqr.com/