Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: Problem with custom control [27616]

$
0
0
If the namespace of custom control that use AjaxControlToolkit different from AssemblyName the application fail in ToolkitScriptManagerConfig class (line 233: "Processing custom controls")

If I add new attribute name :"NameSpace" to Config.Settings Class.

This is part of my AjaxControlToolkit file
(The ns of my assembly is 'OrgName.ClassName.UI.AC)
<?xml version="1.0" encoding="utf-8" ?>
<ajaxControlToolkit>
<controlBundles>
<controlBundle name="Accordion">
<control name="AccordionExtender"></control>
<control name="CollapsiblePanelExtender"></control>
</controlBundle>
<controlBundle>
<control name="ItemsList" assembly="AjaxComponent"Namespace="OrgName.ClassName.UI.AjaxComponent" />
<control name="AjaxFileUpload"></control>
<control name="AlwaysVisibleControlExtender"></control>
...

In ToolkitScriptManagerConfig Class this is new code that slove the problem

// Processing custom controls
var _assembly = control.Assembly;
var _prefix = (control.Namespace != null)
? control.Namespace : _assembly;
registeredControls.Add(ToolkitScriptManagerHelper.GetAssembly(control.Assembly)
.GetType(_prefix + "." + control.Name));

Is Exist other solution ?
Comments: This is a big problem. Although assemblies *should* be named by namespace conventions, there are plenty of (old?) assemblies out there that are not. Custom controls should also work for assemblies whose names don't follow conventions.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>