Tag Archives: how

How to set custom error page in SharePoint 2013/2010

Place the custom error page at “C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ TEMPLATE\LAYOUTS\1033” Code :- namespace UpdateErrorPage { class Program { static void Main(string[] args) { using (SPSite site = new SPSite(“http://siteUrl”,SPUserToken.SystemAccount)) { SPWebApplication webApp = site.WebApplication; webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, “/_layouts/15/1033/customerror.html”); webApp.Update(); … Continue reading

Posted in SharePoint | Tagged , , , , , , , , , | Leave a comment

How to add Favicon Icon on SharePoint Master Page – SharePoint 2013 Site

<head runat=”server”> <!–SPM:<SharePoint:SPShortcutIcon runat=”server” IconUrl=”/_layouts/15/images/favicon.ico?rev=23″/>–> </head>

Posted in SharePoint | Tagged , , , , , , , | Leave a comment

How to get current user id and name in Sharepoint 2013 using Ecma Script

var userid; function GetUserDetails() { clientContext = new SP.ClientContext.get_current(); var oWeb = clientContext.get_web(); currentUser = oWeb.get_currentUser(); clientContext.load(currentUser); clientContext.executeQueryAsync(function () { userid = currentUser.get_id(); usertitle = currentUser.get_title(); }, function (error) { alert(‘Request failed: ‘); }); }

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment