Use a HtmlGenericControl in page_init of the webpage
protected void Page_Init(object sender, EventArgs e)
{
HtmlGenericControl oDesktopJS = new HtmlGenericControl("script");
oDesktopJS.Attributes.Add("type", "text/javascript");
oDesktopJS.Attributes.Add("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js");
Page.Header.Controls.Add(oDesktopJS);
}
protected void Page_Init(object sender, EventArgs e)
{
HtmlGenericControl oDesktopJS = new HtmlGenericControl("script");
oDesktopJS.Attributes.Add("type", "text/javascript");
oDesktopJS.Attributes.Add("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js");
Page.Header.Controls.Add(oDesktopJS);
}
No comments:
Post a Comment