Voici fonction qui crée des objets javascriptjavascript ajax asp net contrôle
public IEnumerable<ScriptDescriptor>
GetScriptDescriptors()
{
ScriptControlDescriptor descriptor = new ScriptControlDescriptor("HierarchyPathControl.PathExplorer", this.ClientID);
descriptor.AddProperty("some_property", "some_value");
yield return descriptor;
}
Voici une partie du fichier .js
Type.registerNamespace("HierarchyPathControl");
HierarchyPathControl.PathExplorer = function (element) {
HierarchyPathControl.PathExplorer.initializeBase(this, [element]);
alert("invoked");
}
HierarchyPathControl.PathExplorer.prototype = {
initialize: function() {
HierarchyPathControl.PathExplorer.callBaseMethod(this, 'initialize');
alert("not invoked");
},
..............................
Pourquoi seconde alerte invoque que si je supprime cette ligne:
descriptor.AddProperty("some_property", "some_value");
Merci.
Voyez-vous des erreurs de type JavaScript? – jrummell