Using ScriptManagerProxy in UserControl

Hi all,

I have a ASPX page in which I have an update panel for AJAX loading of a number of user controls (basically a form which is split down into sections).

Now, i am using ScriptManagerProxy inside the ASCX file (as each usercontrol uses different scripts, so I would like to load on the fly).

<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <asp:ScriptReference Path="~/js/jquery.watermark.min.js" />
        <asp:ScriptReference Path="~/js/jquery.passwordcheck.min.js" />
        <asp:ScriptReference Path="~/js/signup.js" />

Open in new window

However the script are not being loaded into the control (I assume this is because its a partial postback??)

Is there anyway I can invoke the scriptmanagerproxy to reload the scripts on the current user control upon a partial poastback?

If someone could provide some example code on this I would really appreciate it.

Kind Regards,

Who is Participating?
guru_samiConnect With a Mentor Commented:
Looks like it is trying to load the debug version of the file:

Check the ScriptManager's ScriptMode. It might be set to Debug. Change it to Auto or Release.
flynnyAuthor Commented:
Just to point out if I load the page and user firebug I can see that the scripts from the scriptmanagerproxy are present and loaded with the other jscript files.

Now if i try and view the script node for one of the js files the following html is inside the tag

<!DOCTYPE html>
<title>The resource cannot be found.</title>
<meta name="viewport" content="width=device-width" />
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
@media screen and (max-width: 639px) {
pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; }
@media screen and (max-width: 479px) {
pre { width: 280px; }
<body bgcolor="white">
<span><H1>Server Error in '/party epos site' Application.<hr width=100% size=1 color=silver></H1>
<h2> <i>The resource cannot be found.</i> </h2></span>
<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
<b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. &nbsp;Please review the following URL and make sure that it is spelled correctly.
<b> Requested URL: </b>/party epos site/js/jquery.watermark.min.debug.js<br><br>
<hr width=100% size=1 color=silver>
<b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446
[HttpException]: File does not exist.
at System.Web.StaticFileHandler.GetFileInfo(String virtualPathWithPathInfo, String physicalPath, HttpResponse response)
at System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String overrideVirtualPath)
at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Open in new window

which is implying the files could not be found. Now I have double checked and the files do exist, and I have even used the file picker to select to double check.

Any ideas?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.