This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ToolboxItemAttribute(false)] | |
public class CustomWebPart : Microsoft.SharePoint.WebPartPages.WebPart | |
{ | |
// Visual Studio might automatically update this path when you change the Visual Web Part project item. | |
private const string _ascxPath = @"~/_CONTROLTEMPLATES/15/test/CustomControl.ascx"; | |
private const string RelativeFolderCss = "../ReferencedFiles/css"; | |
private const string RelativeFolderJs = "..ReferencedFiles/js"; | |
protected override void CreateChildControls() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |