-
asp.net ajax namespace
<pre data-sub="prettyprint:_"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <title>ASP.NET AJAX Namespaces</title> <script type="text/javascript"> function pageLoad(sender, args) { Type.registerNamespace('Wrox.ASPAJAX.Samples'); alert(Type.isNamespace(Wrox.ASPAJAX)); //displays alert(Type.isNamespace(Wrox.ASPAJAX.Samples)); //displays var namespaces = Type.getRootNamespaces(); for(var i = 0, length = namespaces.length; i < length; i++) { alert(namespaces[i].getName()); //displays }} </script> </head><body> <form id="form1" runat="server"> <asp:ScriptManager runat="server" ID="scriptManager1" /> <div> </div> </form></body></html> </pre>
-
Creating Custom ASP.NET AJAX Client Controls
The full article is <a href="http://asp.net/AJAX/Documentation/Live/tutorials/CreatingCustomClientControlsTutorial.aspx">here</a>, The summary is bellow.
-
Adding Client Behaviors to Web Server Controls by Using ASP.NET AJAX Extensions
<p> A behavior adds functionality to client Document Object Model (DOM) elements. The client behavior can be encapsulated in a Web server control as an extender control. The extender control is then associated with one or more types of ASP.NET server controls to add the behavior to those server controls. You can associate more than one extender control with an ASP.NET server control. An extender control is a web server control that inherites the ExtenderControl. GetScriptDescripters returns a collection of ScriptDescriptor objects that contain information about instances of client components that are used with web server control. This includes the client type to create, the properties to assign, and the events to add handlers for. See the script example below, they will be generated according to this information. GetScriptReferences() returns a collection of ScriptReference objects that contains information about the client-script libraries to be include with then control. The client-script libraries define the client types and include any other javascript code that is required for the control. </p>
-
Reflection
<pre data-sub="prettyprint:_"> var g = new Demo.Trees.GrannySmith(); var gt = Demo.Trees.GrannySmith; var a = new Array( Demo.Trees.Apple, Demo.Trees.Tree, Demo.Trees.Pine, Demo.Trees.IFruitTree, Sys.IContainer);
-
Register namespace, and class
<pre data-sub="prettyprint:_"> Type.registerNamespace("Demo");