Sharepoint JS CSS 註冊

來源:互聯網
上載者:User
【轉 http://www.cnblogs.com/ruijian/archive/2012/04/18/2455863.html】前台註冊

適用於2010VisualWebpart,應用程式頁

   1: <SharePoint:ScriptLink Language="javascript" ID="jqueryScriptLink" Name="/_layouts/tgUI/jquery-1.6.4.js" Defer="false" runat="server"/>
   1: <SharePoint:CssRegistration  ID="SDCSSLink"  Name="/_layouts/tgUI/pagestyle.css" runat="server"/>

 

後台註冊

適用於2007Webpart,在CreateChildControls中添加

   1: ScriptLink JqueryJSLink;
   2: JqueryJSLink = new ScriptLink();
   3: JqueryJSLink.ID = "JqueryJSLink";
   4: JqueryJSLink.Language = "javascript";
   5: JqueryJSLink.Name = "/_layouts/tgUI/jquery-1.6.4.js";
   6: this.Controls.Add(JqueryJSLink);

 

   1: CssRegistration jstreeCSSLink;
   2: jstreeCSSLink = new CssRegistration();
   3: jstreeCSSLink.ID = "jstreeCSSLink";
   4: jstreeCSSLink.Name = "/_layouts/tgUI/jstree/themes/default/style.css";
   5: this.Controls.Add(jstreeCSSLink);

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.