I'm working on a WebControl with some AJAX functionality.
I have a control derived from System.Web.UI.WebControls, which registers the control's javascript with ClientScript.RegisterClientScriptResource. How should I go about actually getting a javascript object instantiated when the control is used on a page, and how to I get the initial data into the object?