Make sure you have installed the Ajax Extender Templates, run AjaxControlExtender.vsi from the AjaxControlExtender directory of your toolkit install.
Create a new item using the ASP.NET Ajax Extender Control Template from my templates.
Note : If you set the namespace to have a . in it e.g. Company.AjaxControls then the Javascript will not be able to find the script as a webresource. If you want to do this then you have to manually change the ClientScriptResource attribute of the extender.
1) Create the C# Property in the controlExtender.cs file
[ExtenderControlProperty]
[RequiredProperty]
public string ExampleControl
{
get { return GetPropertyValue("ExampleControl", ""); }
set { SetPropertyValue("ExampleControl", value); }
}
2) Create the JavaScript Property in the controlBehaviour.js file
- In the function(element) section, at the top of the page by the todo 1 to declare the property on the JavaScript side
this._ExampleControl = null; - Add the property getter and setters at the bottom of the file
get_ExampleControl : function() {
return this._ExampleControl;
},
set_ExampleControl : function(value) {
this._ExampleControl = value;
},