I have a straight forward control that I am trying to embed a js script file as a resource for and I am having issues. It appears that the resource is being made and the webresource.axd line is included in the source of the rendered page, however when i try to access a function in the script it fails and pops the Object Required error. I have followed countless examples and the concept pretty straight forward, I just can't find the error, please help.
In the debugging code at the bottom the GetManifestResourceInfo returns null however the GetManifestResourceStream does appear to return the embedded resource.
protected override void OnLoad(EventArgs e)
{
Type rsType = this.GetType();
ClientScriptManager cs = Page.ClientScript;
if (!cs.IsClientScriptIncludeRegistered("ScrollingListBox"))
{
cs.RegisterClientScriptInclude("ScrollingListBox", cs.GetWebResourceUrl(rsType, "KustomCControls.Javascript.ScrollingListBox.js"));
if (!cs.IsClientScriptIncludeRegistered("ScrollingListBox"))
{
throw new Exception("boom");
}
//cs.RegisterStartupScript(rsType, "ScrollableListBoxStartup" + this.UniqueID, string.Format("__ScrollableListBoxRefineHeightAndWidth('{0}');", this.ClientID), true);
//cs.RegisterStartupScr
View Complete Post