Skip to content

Instantly share code, notes, and snippets.

@MaheshHika
Created November 10, 2016 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaheshHika/77e3eb72b6666789317981f05f563ac8 to your computer and use it in GitHub Desktop.
Save MaheshHika/77e3eb72b6666789317981f05f563ac8 to your computer and use it in GitHub Desktop.
public List<HtmlGenericControl> ControlDefinitionJavascripts(string folderPathJs)
{
genericControl = new List<HtmlGenericControl>();
try
{
HtmlGenericControl jsLinkJquery = new HtmlGenericControl("script");
jsLinkJquery.Attributes.Add("type", "text/javascript");
jsLinkJquery.Attributes.Add("src", folderPathJs + "/jquery.min.js");
genericControl.Add(jsLinkJquery);
HtmlGenericControl jsLinkBootstrap = new HtmlGenericControl("script");
jsLinkBootstrap.Attributes.Add("type", "text/javascript");
jsLinkBootstrap.Attributes.Add("src", folderPathJs + "/bootstrap.min.js");
genericControl.Add(jsLinkBootstrap);
HtmlGenericControl jsLinkCustom = new HtmlGenericControl("script");
jsLinkCustom.Attributes.Add("type", "text/javascript");
jsLinkCustom.Attributes.Add("src", folderPathJs + "/custom.js");
genericControl.Add(jsLinkCustom);
return genericControl;
}
catch (Exception ex)
{
throw ex;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment