Hi ,
I have a tab control on my page and on click of tab user control is loaded dynamically.I need to load the javascript file of that user control dynamically.
I don't want to add the reference of my js file on parent page.
so in my .ascx page load event i added:
System.Web.UI.HtmlControls.HtmlGenericControl js = new System.Web.UI.HtmlControls.HtmlGenericControl("script");
js.Attributes["type"] = "text/javascript";
js.Attributes["src"] = "../../js/DatesJavaScript.js";
Page.Header.Controls.Add(js);
but it is not working.
thanks,