Add-PSSnapin "Microsoft.SharePoint.PowerShell"### GLOBAL VARS, CHANGE HERE$listname = "Style Library" $url = "http://abcd:1234/sites/TestSite/"function approveContent ($w, $listName) { $list = $w.Lists |? {$_.Title -eq $listName} foreach ($item in $list.Items) { if(($item -ne $null) -and ($item.LockId -ne $null)) { $item.ReleaseLock($item.LockId) ...
Wednesday, 30 July 2014
sharepoint check in and publish folder using Powershell
Continue Reading...
Labels:
check In,
Powershell,
publish,
SharePoint
datetime picker in sharepoint c#
Design Code:-
<SharePoint:DateTimeControl ID="dtpstartDt" DateOnly="true" runat="server" IsRequiredField="true" CalendarImageUrl="/_layouts/images/calendar.gif" CssClassTextBox="itw-longDate" LocaleId="7177" ToolTip="Example: 2000-12-31" ...
Labels:
C#,
datetime picker,
SharePoint
Programmatically Check Current user in SharePoint Group using C#
public void CheckcurrentuserinGroup() { SPGroup grp = SPContext.Current.Web.SiteGroups["GroupName"]; if (grp != null) { ...
Labels:
C#,
programmatically,
SharePoint,
SharePoint Groups
get user profile properties programmatically using c#
public void getuserprofilesyncCustomattributesvalues(string MysitecollectionUrl)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPSite siteCollection = new SPSite(MysitecollectionUrl))
...
Labels:
C#,
programmatically,
SharePoint,
SharePoint 2013,
user profile
Programmatically Delete all Item in SharePoint List using c#
public static void DeleteAllItems(string list)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPSite spSite = new SPSite(SPContext.Current.Site.ID))
...
Labels:
C#,
programmatically,
SharePoint,
sharePoint 2010
Set default master page and welcome page in sharepoint 2013 using Event receiver
void ChangeMasterPage(SPWeb Web, string pstrMasterURL, string pstrCustomURL) { Web.MasterUrl = pstrMasterURL; Web.CustomMasterUrl = pstrCustomURL; Web.Update(); ...
Labels:
Event Receiver,
MasterPage,
SharePoint,
SharePoint 2013
Subscribe to:
Posts (Atom)
Followers
Follow The Author
Designed By Templateism | Seo Blogger Templates