Format:
Recent snippets matching tags of Sharepoint
var reverter = new RevertToAppPool(); try { reverter.UseAppPoolIdentity(); } finally { reverter.ReturnToImpersonatingCurrentUser(); }
13 Views
no comments
SPListItem item = properties.ListItem; SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Customer"); SPFieldUserValue fieldValue = (SPFieldUserValue)userField.GetFieldValue(item[userField.ID].ToString()); string customerEmail = fieldValue.User.Email;
91 Views
no comments
Sol Reqs: .NET 3.5 x64 Add Ref: Microsoft.SharePoint assembly // Applying a template to a new site Site Actions –> New Site. You'll find your Site Template in the list of Installed Items, in the All Categories or Blank & Custom filters. // how to upgrade the content database - after applying SP1 C:\Program Files\Common Files\Microsoft Shared\Web ServerExtensions\14\bin\psconfig.exe –cmd upgrade
307 Views
no comments
Get-Process | Where-Object {$_.ProcessName -like "w*"}
Table 1-4. Commonly Used Windows PowerShell Comparison Operators
Operator Purpose
-lt Less than
-le Less than or equal to
-gt Greater than
-ge Greater than or equal to
-eq Equal to
120 Views
no comments
namespace SharePointUpload { class Program { static void Main(string[] args) { ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback((a, b, c, d) => { return true; }); WEB_REFERENCE_NAME.Imaging img = new WEB_REFERENCE_NAME.Imaging(); img.UseDefaultCredentials = true; img.Url = "SHAREPOINT_SITE/_vti_bin/imaging.asmx"; try { foreach (string filename in Directory.GetFiles("LOCAL_FOLDER")) { img.Upload("PICTURE_LIBRARY_NAME", "PICTURE_FOLDER_IF_ANY", File.ReadAllBytes(filename), Path.GetFileName(filename), true);
155 Views
no comments
namespace SharePointUpload { class Program { static void Main(string[] args) { ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback((a, b, c, d) => { return true; }); WEB_REFERENCE_NAME.Imaging img = new WEB_REFERENCE_NAME.Imaging(); img.UseDefaultCredentials = true; img.Url = "SHAREPOINT_SITE/_vti_bin/imaging.asmx"; //img.up try { //var x = img.GetListItems("Implementation Team Photos", "");
104 Views
no comments
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> <style type="text/css"> .sys-template { display: none; } </style> <script src="../Scripts/MicrosoftAjax/MicrosoftAjax.js" type="text/javascript"></script> <script src="../Scripts/MicrosoftAjax/MicrosoftAjaxDataContext.js" type="text/javascript"></script>
645 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
