ScriptMode: Release getting a problem.

May 3, 2010 at 3:48 AM


thank you very much for you amazing control.

I am implementing a 3.5 website acting as document management system which displays PDF content. And it works great with your control.

However, when I set the ScriptMode to Release for ScriptManager in parent page, I got an error. I open your release 1.7 and changed the ScriptMode to Release too and I got the error as well.

Parameter sample

Invalid cast from 'System.String' to 'System.Web.UI.ScriptMode'.
at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
at System.String.System.IConvertible.ToType(Type type, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType)
at iucon.web.Controls.PanelHostPage.CreateScriptManager(IDictionary scriptInfo) in C:\Users\DELL\Documents\Downloads\Compressed\PartialUpdatePanel\PartialUpdatePanel\Control\PanelHostPage.cs:line 297
at iucon.web.Controls.PanelHostPage..ctor(String ControlPath, String ControlClientID, IDictionary scriptInfo) in C:\Users\DELL\Documents\Downloads\Compressed\PartialUpdatePanel\PartialUpdatePanel\Control\PanelHostPage.cs:line 67
at iucon.web.Controls.PartialUpdatePanelHandler.ProcessRequest(HttpContext context) in C:\Users\DELL\Documents\Downloads\Compressed\PartialUpdatePanel\PartialUpdatePanel\Control\PartialUpdatePanelHandler.cs:line 35
In my case I have to change your code in the methods creating ScriptManager for:
  • private ScriptManager CreateScriptManager(IDictionary scriptInfo)
  •  private ScriptManager CreateScriptManager(Page parentPage)
adding this at the end of the object creation: sm.ScriptMode = ScriptMode.Debug;

I just want to contribute to your work since this is wonderful control and I love it. Hope you will keep releasing new version of the control with more and more features added.

Take care mate.