Tag Info

New answers tagged

1

Strong Names Strong naming uses a private key to digitally sign an assembly. Strong naming also stamps the assembly with a public key to validate the signature. This technique guards against unauthorized versions of a Web Part. If the public key fails to validate the digital signature, SharePoint Foundation refuses to run the module. When you ...


-1

This is to remove the logo and the name: #s4-titlerow{ display:none!important; } This is to remove the top bar (newsfeed,...): div#suiteBar { display: none; } This is to remove the gray bar (browse): #s4-ribbonrow{ display:none !important; } Add these to your .CSS file


2

Objects like Web, ClientContext are passed by reference, that is they are not copied. So there is no need to worry about performance. However, as mentioned by @eirikb, pasing ClientContext between methods make more sense as you can then load whatever objects you want from it inside the method.


3

Do: Pass around ClientContext. Call .ExecuteQuery() as few times as possible, bundle/batch up with .Load(). Once is usually enough, only in a very few cases do you need more. Do not: Do not pass around Web. You need to reference other members from ClientContext, such as Site. Do not pass around an URL (either as String or Uri). Initialization ...


2

function Deactivate-SPFeature { param ($FeatureID, $SiteUrl, $WebApplicationUrl) $Feature = Get-SPFeature -Identity $FeatureID -ErrorAction SilentlyContinue $IsActiveFeature If ($Feature -eq $null) { Write-Warning "The specified feature ($FeatureID) was not found." return } If ($Feature.Scope -eq ...


3

I don't believe there is a difference in terms of what they return back (the string representation of the root URL of the site). However, in the second case you are referencing both an SPSite and SPWeb object whereas in the first you are only referencing the SPSite object (so there might be some minor performance considerations if all you are looking for is ...


0

If you're not opposed to doing it manually, the Send To functionality can be used to do this. I've set up a manual "publishing" process on past sites that allows a user to send a copy of the document to a library on a different web application/farm. Obviously, the user must have permissions to write to the destination library but otherwise the Send To is an ...


1

The best way is create event receiver using Visual Studio. After document loaded to library, event receiver must programmatically make copy to another farm.


2

You can order up your approaches as below, ULS Event Viewer Text file. I suggest, ULS - Its the SharePoint native logging and it manages to remove the older files periodically, its better to keep all the SharePoint related logs in one place "ULS". Use SPDiagnosticsService.Local.WriteTrace method in your timer job to log into the ULS logs If you find ...


6

AllowUnsafeUpdates=true; is not required to add/delete/update list items unless you are doing these operations in Page_Load or other Get methods. Both CASE 1 and CASE 2 does not look good in terms of best practice. Problems with both case code: Do not use oSPWeb.Lists["MyList"]; instead use oSPWeb.Lists.TryGetList("MyList1"); Do not use list.Items.Add(); ...


1

Both look same apart from the fact that AllowUnsafeUpdates is used in the second example. However, the better way of adding list items is SPList.AddItem() instead of SPList.Items.Add() See this for more explanation: SPList.Add() vs SPList.AddItem() SharePoint 2010



Top 50 recent answers are included