public class Class1 : WebControl
{
protected override void OnPreRender(EventArgs e)
{
if (this.Page != null)
{
if (manager_JSname== "JScript1")
{
ClientScriptManager manager1 = this.Page.ClientScript;
manager1.RegisterClientScriptResource(typeof(Class1), "ClassLibrary1.JScript1.js");
}
else if (manager_JSname== "JScript2")
{
ClientScriptManager manager2 = this.Page.ClientScript;
manager2.RegisterClientScriptResource(typeof(Class1), "ClassLibrary1.JScript2.js");
}
}
base.OnPreRender(e);
}
private string manager_JSname;
public string Manager_JSname
{
get { return manager_type; }
set { manager_type = value; }
}
}