Posts

Web Part Branding

Image
Create css file "WebPartStyle.css" & upload in Style Library with below mentioned contents : .ms-wpTdSpace{ display:none; } .ms-WPHeader td:first-child {     background: url('g-03.png') no-repeat top right;     background: url('g-01.png') no-repeat top left;     margin: 0;     padding: 0px 0px 0px 20px;;     height: 20px;     display:inline; } .ms-WPHeaderTdMenu {     margin:0px 0px 0px 20px;     background: transparent url('g-02.png') scroll repeat-x right top !important;     border: 0; } .ms-WPTitle {    background: url('g-02.png') no-repeat top repeat-x !important; } .ms-WPTitle A { color:white !important; } .ms-WPHeaderTdSelection{     background: transparent url('g-03.png') scroll repeat-x right top !important; } /* border (title and border) */ .ms-rtestate-field table {     border-collapse: separate; } .ms-WPBorder {     border-top: none;     border-right: 1px #C0C0C0 solid;  

Branding Left Navigation

Image
Create css file "LeftNavStyle.css" & upload in Style Library with below mentioned contents : /* To Set minum Height of the page */ .s4-ca{  min-height:500px !important; } /* Remove Top Space From Left Navigation */ .ms-quickLaunch  { padding-top:5px !important; } /* For Footer */ .custom-footer { clear:both; text-align: center; padding: 10px; background-color: #FCFCFC; border: 1px solid #DBDDDE; } /* Left Navigation Heading */ .s4-ql ul.root > li > .menu-item, .s4-qlheader, .s4-qlheader:visited {         border-bottom:1px solid #B8BABD !important;     border-top: 1px solid #E0E0E0 !important;     font-size: 1.2em;     margin: 0;     overflow-x: hidden;     padding: 3px 4px 3px 10px;     word-wrap: break-word;  background:  url('../SiteAssets/01-03.png') repeat-x;  /*background-color:#005B96 !important;*/  color:#fff; } /* Left Navigation item Hover */ .s4-ql ul.root ul > li > a:hover{  color: #005B96 !important;  backg

Prompting continuously for credential after setting Alternate Access Mapping

I have created a web application in SharePoint & also set the “Alternate Access Mapping” for the web application like: Zone URL Host Header in IIS Default http://sharepoint2010 sharepoint2010 Intranet http://sharepoint2010.mydomain.com sharepoint2010.mydomain.com Internet http://www.mysharepoint2010.com www.mysharepoint2010.com Custom Extranet When I login to http://www.mysharepoint2010.com , it allow me to login. But just after this login, I won’t be able to use my default url ( http://sharepoint2010 ). It prompts me for credentials so many times & won’t allow me to login to the url http://sharepoint2010 . When I reset my iis then it allow me to login to http://sharepoint2010 . But when again I login to http://www.mysharepoint2010.com and then again I want to use url http://sharepoint2010 . It won’t allow me to use this url. I have done some R & D and found that SharePoint uses Session-Based-A

Update Solution with Powershell

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue $SolutionPackageName = "MySolution.wsp" $SolutionPackagePath = "C:\PowershellSetup\MySolution.wsp" Write-Host "Checking Solution exist or not..." -foregroundcolor Yellow $solution = Get-SPSolution | where-object {$_.Name -eq $SolutionPackageName} if($solution -ne $null) { Write-Host "Solution Found & Updating Solution..." -foregroundcolor Green Update-SPSolution -Identity $SolutionPackageName -LiteralPath $SolutionPackagePath -Local -GACDeployment -Force Write-Host "Solution Updated..." -foregroundcolor Yellow } Write-Host "Solution Updation Complete." -foregroundcolor Green

Install WSP with Powershell

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue $SolutionPackageName = "MySolution.wsp" $SolutionPackagePath = "C:\PowershellSetup\MySolution.wsp" Write-Host "Checking Solution exist or not..." -foregroundcolor Yellow $solution = Get-SPSolution | where-object {$_.Name -eq $SolutionPackageName} if($solution -ne $null) { Write-Host "Solution Found..." -foregroundcolor Green if($solution.Deployed -eq $true) { Write-Host "Uninstalling Solution..." -foregroundcolor red Uninstall-SPSolution -Identity $SolutionPackageName -Local -Confirm:$false Write-Host "Uninstallation Done..." -foregroundcolor Yellow } Write-Host "Removing Solution..." -foregroundcolor red Remove-SPSolution -Identity $SolutionPackageName -Confirm:$false Write-Host "Solution Removed..." -foregroundcolor Yellow } Write-Host "Adding Solution..." -foregroundcolor red Add-SPSolution -LiteralPath $Sol

Install WSP with Powershell

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue $SolutionPackageName = "MySolution.wsp" $SolutionPackagePath = "C:\PowershellSetup\MySolution.wsp" Write-Host "Checking Solution exist or not..." -foregroundcolor Yellow $solution = Get-SPSolution | where-object {$_.Name -eq $SolutionPackageName} if($solution -ne $null) { Write-Host "Solution Found..." -foregroundcolor Green if($solution.Deployed -eq $true) { Write-Host "Uninstalling Solution..." -foregroundcolor red Uninstall-SPSolution -Identity $SolutionPackageName -Local -Confirm:$false Write-Host "Uninstallation Done..." -foregroundcolor Yellow } Write-Host "Removing Solution..." -foregroundcolor red Remove-SPSolution -Identity $SolutionPackageName -Confirm:$false Write-Host "Solution Removed..." -foregroundcolor Yellow } Write-Host "Adding Solution..." -foregroundcolor red Add-SPSol

SQL Server 2012 Installation & Configuration for SharePoint 2013

I found best video tutorial & blog which describe how to install & configure SQL Server 2012 for SharePoint 2013. Here you can find : Set Up SQL Server 2012 as a SharePoint 2013 Database Server Configure SQL Server 2012 for SharePoint 2013 Fine-Tune Your SQL Server 2012 Configuration for SharePoint 2013

Update a web part programmatically

This is an example how we can update a web part programmatically in multiple sites. LiteralControl lit = new LiteralControl(); lit.Text = ""; try { using (SPSite site = new SPSite(SPContext.Current.Web.Site.RootWeb.Url)) { for (int i = 1; i < site.AllWebs.Count; i++) { lit.Text += "<BR/>" + site.AllWebs[i].Title; SPFile file=site.AllWebs[i].GetFile(site.AllWebs[i].ServerRelativeUrl + "/default.aspx"); if ( file.Exists) { using (Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager wpm = site.AllWebs[i].GetLimitedWebPartManager(file.Url, PersonalizationScope.Shared)) { foreach (WebPart wp in wpm.WebParts) { if (wp.Title == "Notes") { wp.Height = new Unit("200px"); wpm.SaveChanges(wp); break; } } } } } } } catch (Exception ex) { lit.Text += "<BR/>" + ex.ToString(); } this.Controls.Add(lit);

Use HTML and JavaScript in Calculated Field / Column

Here I found some good examples which shows how to use html & javascripts in calculated columns like if you want to show progress bar in task list based on percent completed or change color of font based on certain condition or put any symbol or highlight row based on any condition. Please check below given links for the same : http://sharepointwijzer.nl/sharepoint-blog/tech/icc-html-calculated-column-sharepoint-view/ http://www.pentalogic.net/sharepoint-products/free-stuff/html-calculated-column/hcc-example-uses

SharePoint Validation Controls

SharePoint Validation Controls You must check this blog for validation related controls. http://karinebosch.wordpress.com/sharepoint-controls/sharepoint-validation-controls/ http://fychan.blogspot.in/2009/12/sharepoint-validation-controls.html