Advertisement

SharePoint 2013 Interview Questions and Answers

SharePoint > SharePoint 2013
Advertisements
Posted by Admin | Posted on Sun, 02 Oct 2016
SharePoint is a collabrative web application thats integrated with Microsoft Office. SharePoint is mainly used as a document management system and storage system and it  contains most features for organization portal with highly configurable templates. SharePoint is a browser-based and document management platform.
SharePoint is a content management portal from Microsoft, it provides personalized access to documents, sites, pages and more.. SharePoint 2013 provides fast search, enable users to find documents/contents quickly. In SharePoint 2013, everything is app e.g., List,Libraries, etc., Types of App Models are "SharePoint Hosted App", "Provider Hosted App".

Posted by Admin | Posted on Thu, 20 Oct 2016
A control that enables user to modify/show content dynamically from the browser. SharePoint has several Out of the Box webparts which enables user to use readily on the page. Some of webparts are ListView webpart, Content Editor webpart, Page Viewer webpart, Image Viewer webpart, Picture Library SlideShow webpart, etc.,

Posted by Admin | Posted on Thu, 20 Oct 2016

SharePoint 2013 Out of Box Webpart - listed few below.

Blog

Blog Archives
Blog Notifications
Blog Tools

Business Data

Excel Web Access
Indicator Details
Status List
Visio Web Access

Community

About this community
Join
My Membership
Tools
What's happening

Content Rollup

Categories
Content Query
Content Search
Project Summary
Relevant Documents
RSS Viewer
Site Aggregator
Sites in Category
Summary Links
Table of Contents
Term Property
Timeline
XML Viewer

Document Sets

Document Set Contents
Document Set Properties

Posted by Admin | Posted on Thu, 20 Oct 2016
App Part helps user to load an app in SharePoint page. It uses HTML Iframe inside sharepoint page to show content of the App. It is also called as client side part, where all the scripts will be executed outside the SharePoint server. So when you create an SharePoint app, an App Part will be created and will be available for the user to add in to the page.

Posted by Admin | Posted on Thu, 20 Oct 2016
Minimal Download Strategy (MDS) is a new feature in SharePoint 2013 that enables to reduce the amount of data thats being downloaded when accessing pages or navigating from one page to another page. This feature increases redering performance of the browser while accessing SharePoint pages.

Posted by Admin | Posted on Thu, 20 Oct 2016
Below are new features that are included in SharePoint 2013

- Cross site publishing
- Office web apps
- Wokflow Manger
- Design Manager
- Client Side Rendering
- Enhanced Social Computing feature

Posted by Admin | Posted on Thu, 27 Oct 2016
Here we have written a snippet to retrieve localized string for the string "MyBooks", if not found default text will get printed.
private static string GetLocalizedString(SPWeb web)
{
     string locStr =string.Empty;
     if (web.IsMultilingual)
     {
         IEnumerable<CultureInfo> cultures = web.SupportedUICultures;
         foreach (CultureInfo culture in cultures)
         {
             // get the value of a language resource in the current language.
             string str = "$Resources:Resource, MyBooks";
             if(System.Globalization.CultureInfo.CurrentCulture.LCID==culture.LCID)
                 locStr = SPUtility.GetLocalizedString(str, "DefaultIfnotFound", (uint)culture.LCID);
         }
     }
     return locStr;   
}

Posted by Admin | Posted on Sun, 30 Oct 2016

using (SPWeb oWeb = this.Site.RootWeb)
{
 
SPList oList = oWeb.Lists["Listname"];
 
SPListItemCollection items = oList.Items;
 
if (items.Count > 0)
  {
   
foreach (SPListItem item in items)
    {    

    if
(!dropdwn1.Items.Contains(dropdwn1.Items.FindByValue(item["col1"].ToString())))
     {
    
dropdwn1.Items.Add(new ListItem(item["col1"].ToString(), item["col2"].ToString()));
     }
    }
  }
}


Posted by Admin | Posted on Thu, 10 Nov 2016
Here it is:

//Main method to consume REST API
function GetListDataUsingRESTapi() {

    var strListName = 'ListName';
    var listUrl = url + "/_api/lists/getbytitle('" + strListName + "')/Items?$top=10000";
    $.ajax({
        url: listUrl,
        method: "GET",
        headers: {
            "X-RequestDigest": $("#__REQUESTDIGEST").val(),
            "accept": "application/json;odata=verbose",
            "content-type": "application/json;odata=verbose"
        },
        success: retrieveSuccess,
        error: retrieveError
    });
}

//Success method to iterate retrieved items
function retrieveSuccess(data) {
    var results = JSON.stringify(data.d.results);
    results = JSON.parse(results);
    if (results.length > 0) {
        for (var i = 0; i < results.length; i++) {
            var resultTitle = results[i].Title;
            var anotherCol1 = results[i].Colname1;
        }
    }
}

//failure method to get error message returned from REST API
function retrieveError(request, status, error)
{
    console.log(error);
}

Posted by Admin | Posted on Thu, 20 Oct 2016
SharePoint custom feature will be created when you want to perform certain action on Activation or Deactivation. Example, lets assume, if you are using SharePoint custom master page and if you want to change the custom master page to out of box master page (seatle master page) on single click, then you can go for SharePoint Custom feature creation. So on activation SharePoint custom master page will be applied and on deactivation default out of box master page will be applied likewise you can write custom feature. There are several SharePoint out of box features also available having many functions. Example, SharePoint Server Publishing Feature, Document Set Feature, Minimal Download Strategy (MDS) feature, etc.,


Recent Updates

  • PowerShell script to set list threshold value at Web Application level
    Here is the script snippet on using Powershell how to update listview threshold value at web application level

    Step1: Open SharePoint powershell management window as administrator

    Step2: Type the below script one by one or execute as PS1 file.

    $wa = Get-SPWebApplication "http://servername:portno/"
    $wa.MaxItemsPerThrottledOperation = 10000
    $wa.MaxItemsPerThrottledOperationOverride = $true
    $wa.HttpThrottleSettings.Update()
    $wa.Update()

    Thats it..!!
  • How to show a element or control using CSS ?
    HTML Code
    <div id="divContainer" class="clsContainer">lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum </div>

    CSS
    css to hide the div element using ID is like below

    <style>
    #divContainer
    {
       display: block;
    }
    </style>

    css to hide the div element using class name is like below

    <style>
    .clsContainer
    {
       display: block;
    }
    </style>
  • How to hide a element or control using CSS ?
    HTML Code
    <div id="divContainer" class="clsContainer">lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum lorum epsum </div>

    CSS
    css to hide the div element using ID is like below

    <style>
    #divContainer
    {
       display: none;
    }
    </style>

    css to hide the div element using class name is like below

    <style>
    .clsContainer
    {
       display: none;
    }
    </style>
  • How to read SharePoint 2013 List Items using REST API and javascript ajax method?
    Here it is:

    //Main method to consume REST API
    function GetListDataUsingRESTapi() {

        var strListName = 'ListName';
        var listUrl = url + "/_api/lists/getbytitle('" + strListName + "')/Items?$top=10000";
        $.ajax({
            url: listUrl,
            method: "GET",
            headers: {
                "X-RequestDigest": $("#__REQUESTDIGEST").val(),
                "accept": "application/json;odata=verbose",
                "content-type": "application/json;odata=verbose"
            },
            success: retrieveSuccess,
            error: retrieveError
        });
    }

    //Success method to iterate retrieved items
    function retrieveSuccess(data) {
        var results = JSON.stringify(data.d.results);
        results = JSON.parse(results);
        if (results.length > 0) {
            for (var i = 0; i < results.length; i++) {
                var resultTitle = results[i].Title;
                var anotherCol1 = results[i].Colname1;
            }
        }
    }

    //failure method to get error message returned from REST API
    function retrieveError(request, status, error)
    {
        console.log(error);
    }
  • How to send Email in ASP.NET ?
    SmtpClient objEmail = new SmtpClient("mailserver.domainname.com", 27);

    objEmail.Credentials = new System.Net.NetworkCredential("mailid@domainname.com", "passwrd");
    //or
    //pass default credential
    objEmail.UseDefaultCredentials = true;

    //based on need
    objEmail.EnableSsl = true;

    //delivery method
    objEmail.DeliveryMethod = SmtpDeliveryMethod.Network;

    MailMessage mail = new MailMessage();
    mail.From = new MailAddress("admin@domainname.com", "Subject title");
    mail.To.Add(new MailAddress("testuser@anotherdomain.com"));

    objEmail.Send(mail);
 

Happy Reading.. Happy Programming :)