How to identify whether a site is based on SharePoint or not

We often come across many sites on Internet or intranet and we always want to know that whether the site is based on SharePoint or not. So, in this article I am going to list all possible ways to identify if a site is based on SharePoint or not.

  • The simplest way is to check the structure of the site i.e. folder structure or different pages. This pattern may show you a SharePoint Publishing site (Pages/Pagename.aspx or default.aspx). You can also search for /SitePages library by typing in the URL.
  • If the site if of high importance OR if the site is very famous, then it will definitely be published as Microsoft case study :
  • As we know, SharePoint on-premise server is hosted on IIS (Internet Information Server), so we can check using HttpResponse or by some other tools that which hosting server is used for a particular site.
  • In Chrome or Firefox browsers, open up console and view JavaScript’s files used on the page. If you see init.js, core.js etc., then it’s definitely a SharePoint site.
  • Right click on any page and see for “view source”. Click on that and search for meta tag. If it’s a SharePoint site, then it will definitely have:-
    <head><meta name=”GENERATOR” content=”Microsoft SharePoint” />
  • If it’s a SharePoint site, then it must be calling web services in it. You can call any of the SharePoint OOTB web services (if it doesn’t open, then you will see the legendary “Error page” or “Something went wrong” page). Just access any of the web service present inside the “_layouts” folder.
    E.g. – <<Site_Url>>/_layouts/lists.asmx

If you will check or test any of the above one or two points, then definitely you can be say that whether site is based on SharePoint or not.


Interestingly, while browsing the Indian Income Tax Department website (, I found that this site is based on SharePoint….voila !!

To confirm on this, I tested using the above points and below are my observations: –

1) Clicked on view source on the home page and searched for meta tag: –




2) Then I searched for init.js, _layouts based structure and other files related to SharePoint:-




3) Lastly, I checked the internal web service of SharePoint by typing this URL in browser – , and see below the SharePoint Error page:-





Do you still need proof? Well enough, I know its SharePoint site now.

Competitive Exams for school going students (class – 5th to 10th, 11th & 12th class)


This blog is something unique and not related to SharePoint. This blog is related to school going students who are preparing or wish to prepare for cometitive examinations. This blog will give you complete information about the various competitive exams. Please click on below links to get the details:-




Important Code Snippets

  1. .NET Regex to express positive numbers with decimal
  2. SharePoint People Picker Control
    <SharePoint:PeopleEditor />
  3. ASP.NET Textbox Textmode=”Number” – RegularExpressionValidator
    <asp:RegularExpressionValidator ID=“RegularExpressionValidator1” runat=“server” ControlToValidate=“tbAccount” ErrorMessage=“Please Enter Only Numbers” ForeColor=“Red” ValidationExpression=“^\d+$”>
  4. ASP.NET Set the value of a textbox textmode=”date”
    txtbox.Text = DateTime.Today.ToString(“yyyy-MM-dd”);

Getting the Reply Count for a SharePoint Discussion (Discussion List)

SharePoint’s Discussion lists are sort of like Document Sets, in that the original post is a Discussion Content Type which inherits from Folder and the replies are the Message Content Type, which inherits from Item. So there aren’t any Documents involved, but Discussions (Discussion list) are once again Folders.

I was working on task to get the replies of a Discussion in a Discussion list.I implemented the following code using SPServices and was able to get the reply count and replies of a particular discussion.
(ItemCount is that mysterious count of replies I was looking for :))

<!DOCTYPE html>

<html lang=”en” xmlns=””>

<meta charset=”utf-8″ />
<title>Governance & Nomination Committee</title>

$(document).ready(function() {
var siteURL = _spPageContextInfo.webServerRelativeUrl;
var discussionListName = “Mergers and Acquisition Committee”;
webURL: siteURL,
operation: “GetListItems”,
async: false,
listName: “Mergers and Acquisition Committee”,
CAMLViewFields: “”,
completefunc: function(xData, Status) {
$(xData.responseXML).SPFilterNode(“z:row”).each(function() {
var ItemCount = $(xData.responseXML).SPFilterNode(“rs:data”).attr(“ItemCount”);
//alert(“ItemCount:=” + ItemCount);

var subject, createdOn, modifiedOn, createdOnDate, modifiedOnDate, createdOnTime, modifiedOnTime, discussionURL;
if (ItemCount > 0) {
subject = $(this).attr(“ows_Title”);
createdOn = $(this).attr(“ows_Created”);
modifiedOn = $(this).attr(“ows_Modified”);

createdOnDate = convertDateTime(createdOn, “date”);
//createdOnTime = convertDateTime(createdOn, “time”);

modifiedOnDate = convertDateTime(modifiedOn, “date”);
modifiedOnTime = convertDateTime(modifiedOn, “time”);

var fileRef = $(this).attr(“ows_FileRef”);
//alert(“fileRef:=” + fileRef);
var filepath = getFilePath(fileRef);
var RepliesCount = getDiscussionRepliesCount(discussionListName, filepath, siteURL);

discussionURL = $(this).attr(“ows_EncodedAbsUrl”);
//alert(“discussionURL:=” + discussionURL);
//discussionURL = discussionURL.substr(0, discussionURL.lastIndexOf(“/”));
//alert(“discussionURL:=” + discussionURL);
var disitemURL = discussionURL + “/DispForm.aspx?ID=” + $(this).attr(“ows_ID”);
$(‘#ulMergersNAcquisition’).append(“Title : ” + subject + “” + “Created On : ” + createdOnDate + “” + “Last Updated : ” + modifiedOnDate + “, ” + modifiedOnTime + “” + “Replies : ” + RepliesCount + ““);
} else {
$(‘#ulMergersNAcquisition’).append(“There are no items to show.”);

} //End of complete function
}); //End of SPServices
}); //End of Doc Ready

function getFilePath(fileRef) {
if (!fileRef) return;
var m = /;#(.*)$/.exec(fileRef);
if (m) {
return m[1];

function getDiscussionRepliesCount(list, filepath, siteURL) {
//alert(‘In getDiscussionReplies :=’ + filepath);
var i = 0;
var finalReplies;
webURL: siteURL,
operation: “GetListItems”,
async: false,
listName: list,
CAMLViewFields: “”,
CAMLQueryOptions: “”,
CAMLQuery: “” + filepath + “”,
completefunc: function(xData, Status) {
$(xData.responseXML).SPFilterNode(“z:row”).each(function() {
if (i == 0) {
var replies = $(this).attr(“ows_ItemChildCount”);
finalRepliesCount = replies.split(‘#’)[1];
i = 1;
//return finalRepliesCount;
} //End of complete function
}); //End of SPServices
return finalRepliesCount;

function convertDateTime(x, formatter) {
var months = [‘January’, ‘February’, ‘March’, ‘April’, ‘May’, ‘June’, ‘July’, ‘August’, ‘September’, ‘October’, ‘November’, ‘December’];
var shortMonths = [‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’, ‘Jun’, ‘Jul’, ‘Aug’, ‘Sep’, ‘Oct’, ‘Nov’, ‘Dec’];

// split up date and time
xDate = x.split(” “)[0];
xTime = x.split(” “)[1];

// split off the hour from the minute/second
xMinSec = xTime.split(“:”)[1];
xHour = xTime.split(“:”)[0];

// set the am or pm suffix
if (xHour > 12) {
ampm = “PM”;
xHour -= 12;
} else if (xHour

<ul id=”ulMergersNAcquisition”></ul>

Important points to know about Site Columns and Content Types in SharePoint 2013

In one of my recent projects of SharePoint Online (Office 365), I need to create the site architecture starting with creation of Site Columns and Site Content Types. To give you the glimpse of the project, it involved roll-up and roll-down of data from 300 sub-sites under the root site collection. So, I decided to use Content Search web-part which allows to roll-up the data and by modifying the queries, we can roll-down the data too.

What I learnt –

  1. Use OOTB site columns as much as possible, do not create your new site columns if already provided by SharePoint. However, if OOTB columns doesn’t suits your requirement, then you can create new custom column (For E.g. – OOTB “Due Date” columns is of Date type, so if you wish Date and Time type column then you cannot use this OOTB column)
  2.  Always create a separate group for your site columns and content types.This will help you to filter the columns and content types.
  3. Many times, we make columns as Hidden for one list/library and then try to add the same columns in other list/library which we find is not available. So, before adding a site column in any list/library or any content type, make sure that the column is not hidden at top level.
  4. After migration or after creating a site template, your site is not getting created (assuming your site having workflow also), then change your .wsp file to .cab file and check the XML files. Try to delete the duplicate entries of site columns and content types which are created twice.

Check Logged-in User in SharePoint Group using SPServices

$(document).ready(function() {
var userName = $().SPServices.SPGetCurrentUser();
operation: “GetGroupCollectionFromUser”,
userLoginName: userName,
async: false,
completefunc: function (xData, Status) {

if ($(xData.responseXML).find(“Group[Name=’Site Members’]”).length == 1) {
alert(“login inside of the Group user”);
else {
alert(“login outside of the Group user”);

}//End of completefunc
});//End SPServices
});//End Doc Ready

Check Existence of User in SharePoint Group using JSOM

While working with SharePoint objects it’s required to check whether user is present in which SharePoint group.Hence, the below script comes in handy to check existence of user in SharePoint group using JSOM.

ExecuteOrDelayUntilScriptLoaded(IsUserExists, “sp.js”);
var spfGroup;
var spfUsers;
var context;
var spfGroupCollection;
var spfUser;

function IsUserExists() {
context = SP.ClientContext.get_current();
spfGroupCollection = context.get_web().get_siteGroups();
spfUser = context.get_web().get_currentUser();
spfGroup = spfGroupCollection.getById(101);
spfGroup = spfGroupCollection.getByName(“SPF Owners”);
context.executeQueryAsync(Function.createDelegate(this, this.OnGetGroupSuccess), Function.createDelegate(this, OnFailure));


function OnGetGroupSuccess() {
spfUsers = spfGroup.get_spfUsers();
context.executeQueryAsync(Function.createDelegate(this, this.OnGetuserSuccess), Function.createDelegate(this, OnFailure));

function OnGetuserSuccess() {
var userEnumerator = spfUsers.getEnumerator();
while (userEnumerator.moveNext()) {
var spfUser = userEnumerator.get_current();
if (spfUser.get_id() == spfUser.get_id()) {
alert(“User Exists”);
} else {


function OnFailure(sender, args) {
alert(“Failed to execute IsCurrentUserMemberOfGroup method”);

Hope this blog helps 🙂

Pages in SharePoint 2013

It’s very important to make decision when planning a Web Content Management (WCM) application that which type of web page is suitable for the given task. We can create a WIKI page, a Web Part Page, or a Publishing Page. In this blog, I would be discussing that which page would be most appropriate in any given situation.

Publishing Pages

  • Designed for creating content pages in a controlled manner with consistent look and feel, these pages are based on page layouts and content types. Typically, page layouts are created by web page designers and publishing content pages can be created based on pre-defined page layouts by authors. This is a common scenario for Web Content Management (WCM) systems.
  • Publishing Pages have pre-defined content areas similar to Web Part zones. This allows page designers to define page layouts and impose full control over how page content can be rendered.
  • Publishing Pages content can be versioned and maintain a history of changes. Publishing Pages optionally allows for introducing page approval and scheduling life cycle.
  • Publishing Pages are stored in Pages library. This library is only available when publishing infrastructure is enabled on the site. There can only be one page libraries per site.

Web Part Pages

  • Content on a Web Part page is constrained to display in individual Web Parts. Web Part pages are structured Web Part content objects including lists, libraries, and other collaborative content including rich media, web pages, search results, and an information aggregation. Users can’t easily add text or images to Web Part pages – it requires Web Parts like the Content Editor Web Part (CWEP) or image Web Parts. This can be a deciding factor in choosing WIKI Part pages over Web Part pages because adding simple graphic images would require Web Parts and knowledge of the Content Editor Web Part (CWEP) implementation and configuration.
  • Web Part pages have pre-defined content areas like Web Part zones where Web Parts can be added and moved as needed.
  • A Web Part pages’ layout and content can be configured for all users or optionally personalized for individual users.
  • Web Part pages can be stored in any document library, though ideally stored in Site Assets, Site Pages, or another Document Library.

WIKI Pages

  • WIKI pages consists of a rich text editing environment providing WYSIWYG In-Browser editing experience using Web Editing technology. Users add free-form text & rich content like tables, links, images, as well as SharePoint lists and Web Parts anywhere on the page without the limitation of Web Part zones. WIKI Pages do not require Web Parts like the content editor or image Web Parts to add texts or images.
  • While you can easily add Web Parts to Web Part pages, this requires experience with the Content Editor Web Part (CEWP) for advanced customization. It’s much easier to place free-form text, images, and links including Web Parts on a WIKI page. This makes WIKI pages more flexible, faster and easier to develop than Web Part pages.
  • WIKI pages are easier to manage than Web Part pages. End users need minimal IT support. This is a major advantage over Web Part pages. Conversely, because it’s so easy to apply different fonts and styles on WIKI pages, Web Part pages allow better governance and control over the presentation, formatting, and general look and feel.
  • A major issue of WIKI pages is the presence of hidden HTML tags encountered while editing the page in a WYSIWYG editor. This can be frustrating for the user who doesn’t have knowledge of HTML and are concerned with how to remove those hidden tags and spaces. Power Users employ tools like SharePoint Designer to manage HTML tags such as hidden paragraph and DIV tags.
  • Another issue with WIKI pages is targeting specific sections to brand WIKI pages. Because WIKI pages uses CSS classes to wrap most of the content tags like DIV, it may be a challenge to target specific sections of a WIKI page for branding. Web Part pages allow wrapping of Web Part zones with DIV tags to target specific areas with CSS.
  • WIKI pages have HTML zones where content can be added directly on the page.
  • WIKI pages can’t be personalized. They are designed to share information in a collaborative way, allowing multiple contributors to add and update content.
  • WIKI pages’ support versioning and maintain a history of changes.
  • WIKI pages are stored in the site pages’ library.
  • WIKI pages are created and edited by Site Members or above security groups (requires Contribute permission).
  • All the content added to WIKI pages are added as HTML mark-up. There is no direct API available to programmatically maintain (add or remove) Web Parts on the WIKI pages.

Generally, WIKI pages are the best option for Intranet content pages. WIKI pages deliver the flexibility to add diverse content easily while allowing a more intuitive experience for non-IT business users.

The final implementation of a well-designed web presence will most likely employ all three of these web page variations.

Publishing Pages – Main Intranet Home Page: Since this page is the main landing page for all users, it usually requires the most structured presentation with a fixed page layout making Publishing Pages the ideal choice.

Web Part Pages – Department or Major business area Home Pages:  Most department level home pages are maintained by department level content owners. In order to standardize the look and feel and the layout of home pages across an intranet, Web Part pages are considered the ideal choice by encouraging department level content owners to add content in a more controlled manner.

WIKI Pages – Intranet Content Pages and Team Site Home Pages: Given the WYSIWYG in-page editing capabilities, WIKI pages are an ideal vehicle for end-users to create and manage content on team sites.