ID

Uploaded

Status

Description

Work Items

Action

7697
by guymestef
Dec 9, 2010
9:29 AM

Being evaluated

null exception is thrown when the property CombineScripts of ToolkitScriptManager is set and not CombineScriptsHandlerUrl.

Modification of the method "private void AddScriptManagerInfo(ScriptControlDescriptor descriptor)" in PartialUpdatePanel.cs in :


private void AddScriptManagerInfo(ScriptControlDescriptor descriptor)
{
ScriptManager sm = ScriptManager.GetCurrent(this.Page);
if (sm != null)
{
Dictionary<string, string> info = new Dictionary<string, string>();
info.Add("ScriptManagerID", sm.ClientID);
info.Add("ScriptManagerType", HttpUtility.UrlEncode(Encryptor.EncryptToString(sm.GetType().AssemblyQualifiedName)));

// add properties
object propertyValue;
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(sm))
{
if (property.Name != "ID" &&
property.IsBrowsable && !property.IsReadOnly &&
property.ShouldSerializeValue(sm))
{
propertyValue = property.GetValue(sm);
info.Add(property.Name, propertyValue != null ? propertyValue.ToString() : String.Empty);
}
}

descriptor.AddProperty("ScriptManagerInfo", info);
}
}

Download

7675
by Guymestef
Dec 7, 2010
3:07 PM

Being evaluated

When the ToolKitScriptManager has the property ScriptMode set to "Release", an exception is thrown : Invalid cast from 'System.String' to 'System.Web.UI.ScriptMode'.
Enum conversion from a string added :

if (property.PropertyType == typeof(Uri))
property.SetValue(sm, new Uri((string)propertyValue, UriKind.RelativeOrAbsolute), null);
else if (property.PropertyType.IsEnum && propertyValue.GetType() == typeof(string))
property.SetValue(sm, Enum.Parse(property.PropertyType, propertyValue.ToString(), true), null);
else
property.SetValue(sm, Convert.ChangeType(propertyValue, property.PropertyType), null);

Download

View All
  • 1-2 of 2 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches