Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Answers

1.The Microsoft Ajax Library can be extended in three ways, as follows:
  • Nonvisual controls that extend the Sys.Component class

  • Visual controls that extend the Sys.UI.Control class

  • Behaviors that extend the Sys.UI.Behavior class

2.The sequence of steps is as follows:
  1. Register the control’s namespace.

  2. Inherit from the Control base class.

  3. Initialize the base class in the control’s constructor.

  4. Implement the prototype pattern to override Initialize, Dispose, and the other methods and properties.

  5. Register the control.

3.To refer to an external script file using the ScriptManager control, use the ScriptReference attribute of the control, as shown in the following code snippet:
<asp:ScriptManager id="ScriptManager1" runat="Server">
    <Scripts>
          <asp:ScriptReference Path="MyControl.js" />
     </Scripts>
</asp:ScriptManager>

4.You can specify the base class from which your custom control inherits, as follows:
AjaxSTYSeries.MyControl.inheritsFrom(Sys.UI.Control);

In this statement, AjaxSTYSeries is the namespace and MyControl is the name of a custom control class that inherits the Sys.UI.Control class.

5.Behaviors are used to add new functionalities to an existing control and provide a more elegant user interface with added functionalities in it.

 


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial