SharePoint Interview Questions and Answers

SharePoint Interview Questions and Answers

Last updated on 25th Sep 2020, Blog, Interview Question

About author

Danish (SharePoint Project Manager )

Delegates in Corresponding Technical Domain with 11+ Years of Experience. Also, He is a Technology Writer for Past 7 Years & Share's this Informative Blogs for us.

(5.0) | 12543 Ratings 1010

SharePoint developers are great and are a vital resource for the stability and growth of your organization. They are bricklayers and have a strong focus on the technical component of the environment.

1.What do you mean by MOSS?

Ans:

MOSS stands for Microsoft Office SharePoint Server

It is the complete version of a portal-based platform for collaboratively creating, managing and sharing documents and Web services.

2.Explain the following: a) SPSite b) SPWeb

Ans:

a)SPSite-

1) It is a site collection and can be represented as SPSite class in the object model.

2) SPSite object is a primary entry point to the server object model.

3) It is used frequently in SharePoint application development.

b)SPWeb-

1) It is a specific site under site collection in Sharepoint.

2) It is represented as SPWeb class in the server object model.

3.Explain the following:a) Site template-

Ans:

1) Site template provides the basic component and layout of a new site to be created in SharePoint.

2) It contains specific design information about a site which includes –

  • The list that is part of the site,
  • Web part pages used in the site,
  • The site’s themes and borders,
  • Changes to the quick launch bar,
  • Some site content like document libraries
3)It allows the SharePoint applications to be instantiated time and again.

b)Site definition-

Ans:

1) Site definition is a collection of XML or ASPX files which contains all the necessary components.

2) It contains three files – webTemp.xml, onet.xml, default.aspx.

3) It contains information of web parts, lists, libraries, features, and navigation bars to be included in the site which are packaged in SharePoint solution files (.wsp).

4) Everything packaged into a single file makes the transportation of everything easy

c)ONET.xml-

Ans:

1) Onet.xml file specifies all the components contained in a site. It is considered as the core of a site definition.

2) It is present at following location:

4.What are the various classes in Server Object Model from a development point of view?

Ans:

Following are the classes in Server Object Model from development point of view:

  • SPFarm
  • SPWebApplication
  • SPSite
  • SPWeb
  • SPList
  • SPListItem
  • SPDocumentLibrary

5.Which class is used to retrieve data from multiple lists?

Ans:

SPSiteDataQuery class is used to retrieve data from multiple lists.

It queries the data from multiple lists across different sites in a collection.

Usually it is used in list aggregation, where list data from team sites or other sub-sites is collated and presented in a single interface.

It aggregates the data from SharePoint lists only while ignoring data from external lists.

6.What do you mean by WSP?

Ans:

WSP stands for Web Solution Package. It is a cabinet file that contains assemblies, resource files, features, images, application pages, site definitions etc. into a single file.

Whenever any customization or upgradation or updation is carried out in SharePoint, various items like assemblies, resource files, features, images, application pages, site definitions etc. are required to be deployed.

It becomes difficult to deploy these items separately in development, staging and production. This called for a powerful deployment tool in the form of WSP.

7.How is AllowUnsafeUpdates used?

Ans:

When a developer updates the content database without requiring a security validation, AllowUnsafeUpdates property is set to true.

Once the operation is carried out, the property is again set to false .

8.What is CAML?

Ans:

CAML also called Collaborative Application Markup Language is the custom XML language in SharePoint.

It is used to define key objects such as lists, columns, and content types.

9.Which is better – SPS or STS?

Ans:

Before we begin

let us see what these two abbreviations stand for.

    1. 1.SPS means SharePoint Portal Services
    2. 2.STS means SharePoint Team Services

Document management systems in SPS are better than STS

The search engine in SPS is better, more efficient and possesses the capability to crawl multiple content sources in comparison to STS.

If Document Management is not required, STS is easier to manage for a team environment while SPS is better for an organization where Document Management is required.

10.Name the various input forms that can be created for a workflow?

Ans:

  • Association form
  • Initiation form
  • Modification form
  • Task edit form.
Subscribe For Free Demo

Error: Contact form not found.

11.Differentiate between CustomMasterUrl & MasterUrl?

Ans:

MasterUrl is used to change the layout of all end user pages while CustomMasterUrl is used for changing the layout of admin pages.

12.What are the various zones in SharePoint?

Ans:

Zones provide the separate logical paths of authentication for the same web application.

5 zones can be created for each web application :

    1. 1.Default
    2. 2.Intranet
    3. 3.Extranet
    4. 4.Internet
    5. 5.Custom

13.Explain Farm in SharePoint.

Ans:

Farm is a collection of SharePoint servers with the same configuration database.

All the required information to run the farm is carried in Configuration DB. There exists only one configuration database for each farm.

Central administration is used for the administration of each farm.

14.Explain WebApplication.

Ans:

WebApplication is a IIS website. A Content database is created for each WebApplication.

WebApplication can be created from central admin.

Once a web application is created, it can be extended to different zones.

15.Differentiate between WSS 3.0 and MOSS 2007.

Ans:

WSS 3.0 is freely available with Windows Server while MOSS 2007 is a paid product.

MOSS 2007 has some more features like Enterprise Search, Business Data Catalog(BDC), User Profile, Excel Services, Single-Sign on, additional Workflows, My site feature etc. in addition to those in WSS 3.0.

16.What tools can be used to back up a SharePoint 2010 environment?

Ans:

SharePoint farm backup and recovery

SQL Server

17.Explain1) BDC 2) BCS

Ans:

    1. 1)BDC – Also called Business Data Catalogue is used to connect to an external database and read it in SharePoint.
    2. 2)BCS – Also called Business connectivity Services is new in SharePoint2010. BCS aids in reading and writing into the external Database.

18.Explain Content types in Sharepoint.

Ans:

A content type is a WSS type definition which is flexible and reusable.

It is used to define the columns and behavior for an item in a list or a document in a document library.

19.Differentiate between Library vs List.

Ans:

Library is used to store the document whereas Lists are the container of similar items in the form of rows and columns.

Core documents like Word, Excel, and PowerPoint can be created using a Library while you can not create a document in a List. List can be used to attach a document.

20.What do you mean by Field Control?

Ans:

Field controls are ASP.NET 2.0 server controls. They provide basic field functionality in SharePoint.

They also provide basic general functionality such as displaying or editing list data as it appears on SharePoint list pages.

21.What are the various types of input forms that can be created for a workflow?

Ans:

Four types of input forms can be created for a workflow:

    1. 1.Association form
    2. 2.Initiation form
    3. 3.Modification form
    4. 4.Task edit form

22.Explain an ancestral type. How is it related to content types?

Ans:

An ancestral type is the base type that the content typed is derived from.

It defines the metadata fields included with the custom content type.

23.Explain Microsoft SharePoint Portal Server?

Ans:

SharePoint Portal Server is a portal server that connects people, teams, and knowledge across business processes.

It integrates information from various systems into one secure solution through single sign-on and enterprise application integration capabilities.

It provides flexible deployment and management tools, and facilitates end-to-end collaboration through data aggregation, organization, and searching.- It enables users to quickly find relevant information through customization and personalization of portal content and layout as well as through audience targeting.

24.Explain 

1)Custom action

Ans:

It Represents a link, toolbar button, menu item, or any control that can be added to a toolbar or menu appearing in the UI.

Custom actions are defined through a custom action element within a feature definition file. Custom actions can be bound to a list type, content type, file type, or programmatic identifier (ProgID).

2)Event receiver

Ans:

Event receivers can be defined by using a receiver element within a feature definition file.

They evaluate an event and define the behavior of an application.

25.Explain Module in Sharepoint

Ans:

A module is a file or collection of file instances which define the location where the files are installed during site creation.

They are used to implement a Web Part Page in the site.

Modules can be defined by using a module element within a feature definition file.

26.What are the different types of base classes used in web-part?

Ans:

Sharepoint allows the business to collaborate using the same platform for the enterprise as well as web. It also allows many individuals to easily create and manage the websites. There are two types of bases classes that are used by share-point and they are:

    1. 1.Share-Point Web-Part Base class : Allows the derived web-part base class to inherit the properties from the Microsoft.SharePoint.WebPartPages.WebPart
    2. 2.ASP.NET 2.0 Web-Part base class : Allows the derived base class to inherit the properties from the default class of System.Web.UI.WebControls.WebParts.WebPart. This is the most widely used class.

27.What is the difference between the Sharepoint Web-Part and ASP.NET 2.0 Web-Part base class?

Ans:

The difference between the two types lies in the architecture produced by them:
Sharepoint webpart base class : Is designed to build over the Microsoft ASP.NET web part infrastructure. Whereas, ASP.NET 2.0 WebParts base class : Provide the integrated set of controls to create a website. This enables the user to modify the content and behavior of the webpage using the user interface and directly from the browser.
Sharepoint webpart base class : It provides backward compatibility and can be used with ASP.NET application also and other applications that include the functionality to execute the code. Whereas, ASP.NET 2.0 WebParts base class : Doesn’t include backward compatibility and allows easy to use user interface.Sharepoint webpart base class : There are some features to be provided with it such as:

    1. 1.Cross page connections : This is used to include the pages that are connected with each other but not as a part of the website.
    2. 2.Connections between Web Parts : These are the connections that are outside the Web Part.
    3. 3.Client-side connections : Includes the webpart service components that include all the services that are required to be shown.
    4. 4.Data caching infrastructure : Consists of the data structure that is used to keep all the data in the cache for future use.Whereas, ASP.NET webparts base class : Consists of controls that can be saved and some sessions that can be personalized using the web part capabilities.

28.What is the function of Global Assembly Cache in Sharepoint?

Ans:

Global assembly cache includes the assembly code or the machine code that is used to run the program so that it doesn’t have to bring the program in the memory. If the same program runs again then the binaries are fetched from the cache itself that makes it faster and easier to manage. It provides custom binaries that are deployed to be used in between the receiver and the sender. It is used with the .NET assemblies cache for the command line platform. It consists of the totally controlled repositories with the addresses given of the shared library.

29.Explain the CreateChildControls() method with an example

Ans:

CreateChildControls() method notifies the server about the control that to implement the child controls for posting back and for rendering. The statement is given as:Protected: virtual void CreateChildControls();
The example shows the implementation of the CreateChildControls() method that is:

  • ‘Override CreateChildControls to create the control tree.
  • <System.Security.Permissions._
  • PermissionSetAttribute(System.Security._
  • Permissions.SecurityAction.Demand, Name:=”FullTrust”)> _
  • Protected Overrides Sub CreateChildControls()
  • ‘ Add a LiteralControl to the current ControlCollection.
  • Me.Controls.Add(New LiteralControl(“<h3>Value: “))  ‘
  • Create a text box control, set the default Text property,
  • ‘ and add it to the ControlCollection.
  • Dim box As New TextBox()box.Text = “0”
  • Me.Controls.Add(box) 
  • Me.Controls.Add(New LiteralControl(“</h3>”))
  • End Sub ‘CreateChildControls


This is the method that is used to instantiate the control and fetches the properties to set it according to the website. The add () method of the control class adds the control in the collection. The method CreateChildControls () implies that the WebPart consists of a collection of child controls

30.What is the purpose of the WebPartManager sealed class?

Ans:

WebPartManager sealed class consists of the responsibility for the management that is occurring on the webpage. This consists of controls, events and other activities that need to be saved and worked upon. It is responsible to provide a central class through which the data can be controlled using the control set. It consists of all the methods that are required by the control developers for the extension of WebPartManager that is controlled inside the WebPartManagerInternals class. It includes simplified API and libraries that inherit the customized properties of the control. It includes the controls with custom display modes, zones, verbs, WebPart controls, and extensions that are used for web user interface.

Course Curriculum

Best Sharepoint Training with UPDATED Syllabus By Industry Experts

  • Instructor-led Sessions
  • Real-life Case Studies
  • Assignments
Explore Curriculum

31.What is the purpose of the SPWebApplication object represented in sharepoint?

Ans:

SPWebApplication object comes under the SPWebApplication class that is the parent class used to run the web services of the web. There are instances of the applications that are made as an application and configured to provide the identity to various objects. This class provides the namespace that provides the web application properties through which users can access the web applications. The application is used as a sharepoint web application that provides an IIS virtual server to be implemented and the instance is created to provide the operation for creating a new web application through the code. It is also used to provide the user with the web level setting to display their pages and modify it directly from the browsers.

32.Write a program that connects the reference to the sharepoint list.

Ans:

The program that is used to connect the references given for the object and allow the insertion of the new list is as follows:

  • using(SPSite my =new SPSite(“serverurl”))
  • {    
  • using(SPWeb myWeb=my.OpenWeb())    
  • {        
  • SPList interviewList=myWeb.Lists[“insert”];        
  • SPListItem newItem=interviewList.Items.Add();        
  • newItem[“careerride”] =”careerride”;        
  • newItem.Update();    
  • }
  • }

In this the references are used to connect the items from the list like the use of a new operator that is used to create an object or an instance to include the items that are required to be inserted in the list of the items with proper linking.

33.What is the function and use of CAML?

Ans:

CAML is known as Collaborative Application Mark-up Language and it is an XML based mark-up language. It is used with the family of Microsoft technologies with the Sharepoint. CAML consists of some very specific groups of tags that defines and displays the data used in the database. It is used to store the list definitions using the file name ONET. XML and other files that are related to it. The CAML is used to define the elements that exist on a particular instance of the web site. It also displays the sub-elements that are used in ASPX files. These files define the arrangement and displaying of the element in proper format. CAML is used as the language for the query purpose to represent the views of the programming language using certain inbuilt APIs.

34.What are the different types of elements used in CAML?

Ans:

CAML allows the developers to construct and display the data using the rendering process and other processes. CAML consists of different types of elements to represent the lists and the sites by using some predefined style

    1. 1.Data definition elements : It is used to define the lists and the sites by using the XML tags with the same style. The code will look like this:
  • <Fields><Field Type=”Counter” Name=”ID”/>// insert other statements here</Fields>
    1. 2.Data rendering elements : CAML also allows the generation of HTML based sets that use the tags like the loops that are used to loop around a given condition.

The example is given below that shows the drop down menu with choices:

  • <ForEach Select=”CHOICES/CHOICE”>
  • <HTML>fld.AddChoice(</HTML>
  • <ScriptQuote>
  • <Property Select=”.”/>
  • </ScriptQuote><HTML>,
  • </HTML><HTML>);
  • </HTML>
  • </ForEach>

35.Why are event receivers used in Sharepoint?

Ans:

Event receivers are the classes that inherit the properties of the SpItemEventReceiver and SPListEventReciever base class. Both of these classes use the abstract base class that is SPEventReceiverSTatus. This base class provides the option to respond to the event of the occurring of the sharepoint. It keeps the function of adding and deleting of an item. The event receivers respond to the requests that come when an event is performed by the user. For example, if a cancellation of an action is performed then the request is received by the event receiver and the actions will be taken according to the request received. The event receivers are used to store the input of the action that has been taken by the user by performing an action on the button or any other action on the site.

36.What is the function of a content type in sharepoint?

Ans:

Content type consists of the information or acts as a blueprint that has the reusability properties. This feature is included in the sharepoint to define the Meta information like metadata and its associated information and properties. It acts like an extension to the sharepoint program and consists of the list of the types that are present. It is also used to make the list portable for use throughout the instance of the type by using the instantiation process. It is used to set the content type as location independent. Multiple content types can exist together in one document library and the setting of the document library becomes enabled. It will have access to the list form pages, workflows, templates and custom written functionality. Content type is important to all the deciding of the different types of contents that are used in sharepoint.

37.What are the different components that are used for single as well as multiple servers?

Ans:

Sharepoint consists of many different components of the server that can perform many tasks at a time. The list that is given below consists of the components that are used by the sharepoint and it is as follow:

    1. 1. Sharepoint foundation : This is the program that provides the communication, collaboration and management of the content between the server systems.
    2. 2.Sharepoint server : This consists of the software that provides the material for both the internet as well as local sites.
    3. 3.SQL Server Reporting Services (SSRS) Integration : It is a feature that allows the installation and the containment of the reports to be managed in the sharepoint itself.
    4. 4.Business Connectivity Services (BCS) : It is a feature that allows the system to display the data that is contained inside the sharepoint server. The data can be directly manipulated and worked upon from the sharepoint.
    5. 5.Sites : It is a SharePoint site that is managed by checking the compatibility with the content-management features.
    6. 6.The single server consists of the database servers and the servers that consist of all the data related information. The single server environment is not scalable and there are many applications that can’t be installed because of the reduced size. Multiple servers are used to keep user Profile Synchronization in a single server with all the built-in functionalities like database. Other servers will consist of the services that are distributed to many layers and provide easy scaling up of the architecture.

38.What is the difference between WSS and MOSS?

Ans:

WSS is known as Windows Sharepoint service and it is the core technology used in sharepoint and it is the heart engine of the sharepoint program. It provides management techniques and reporting services to be used with some tools that can be used for communication. It is a free to use service that is implemented on the windows server and used by the sharepoint. Whereas, MOSS (Microsoft office Sharepoint server) just extends the capability of WSS and provides features like audio and video. It includes search engines and enterprise facilities that are used to personalize like management of content and search, etc. It is not free software and can’t be used directly.

39.What are the steps required for the sharepoint to act like an Organizational Platform?

Ans:

The steps that are required to make the sharepoint act like an organizational platform is as follows:

    1. 1.The individual groups that are already present in the sharepoint consist of the collaborative web site that can contain the data and the communication tools to communicate between different objects of the sharepoint.
    2. 2.The access to the team and the appropriate group of members will be restricted or limited due to the automotive tools that are present.
    3. 3.The storing of the relevant information can be centralized and maintained according to the organization.
    4. 4.The communication can be maintained and streamlined so that it will be easier to use and communicate with the parties.
    5. 5.The involvement of the IT is minimum and familiar tools and technologies are used like web, and windows operating systems.

40.What is the function of delegate control?

Ans:

Delegate control in sharepoint allows the object oriented features to be controlled and replaced by the custom control without doing any modification to the rest of the page. It provides an easy way to access and override the existing functions. It provides certain controls that like add or remove by using the control. The delegate control is a very important feature that is included in WSS and MOSS. The delegate control is instantiated by the use of the following lines:

  • <SharePoint:DelegateControl runat=”server”ControlId=”InputBox” />

The delegate control object uses the features to locate the control that is specified in the ControlID. There are features that are used to create and deploy the InputBox control on the server using the web services.

41.Why is it required to use a sandbox solution in sharepoint

Ans:

The sandbox solution allows easy deployable and reusable packages to be used that consist of features, site definitions and many more functionalities. The sandbox solution can be enabled and disabled manually by going and changing from the settings. The solution can be deployed on the server. The sandbox allows the restriction to be put where the execution of the environment allows certain resources to be enabled and kept into the sandbox without affecting the rest of the server. Sandbox solutions can’t affect the whole server as they are not used to deploy at the administrative level. It can be deployed on a site with the administrator permissions using the site collection. Only the administrator is allowed to configure the sandboxed solutions that are related to settings like load balancing, tiers, quotas and resource points, etc.

42.What are the uses that are taken by using the sandboxed solutions?

Ans:

There are many uses and benefits by using the sandboxed solutions:

    1. 1.When there is a need to run the code that are in the production and on the server site then to review and test the code at a particular times becomes difficult as it requires lot of setups of the server and other facilities so to get over this in there are the organization that create the sandboxed solution and uses it to provide different files on which the review and the testing can be performed.
    2. 2.This can be added to any production environment without the risk of affecting the processes that are outside the sandbox.
    3. 3.Site collection administrators allow deploying the sandboxed solutions using the administrative tasks. The sandbox solutions also provide scalability and flexibility as it can be run in the separate process and it is not restricted by the quotas.
    4. 4.The sandbox solution can be modified and recompiled directly on the web server.

43.What are the different kinds of solutions present in deploying the web servers?

Ans:

Solutions are contained in the files with the extension of .wsp that contains the features, site definitions, web parts and assemblies that are used to define the whole architecture to provide the solution for deployment of the web servers.

There are two solutions that can be deployed for this purpose:

    1. 1.Farm : It is deployed on front end web servers using the user interface libraries by the farm administrators. The administrator in this case will have full control over the server object model and it won’t be having any limitation for the modification done in the files that consists of the solutions configurations.
    2. 2.Sandbox :It is deployed using the collective response format of the site administrator that is having the full control with the full permission and the configuration file resides at the root of the site collection. It has the limited access to the resources provided by the server object model and provides isolation and monitoring techniques to the limited users

44.What are the requests that can’t be fulfilled by the sandboxed solutions?

Ans:

Sharepoint server solution consists of a configuration file of the name manifest.xml and other configuration files to run the binaries and assemblies for proper functioning of the program. If the solution is running in the sandbox then the configuration files permissions are limited for the users. The following things that can’t be performed by the sandbox are:

    1. 1.The solution can’t connect to the resources that have to be provided to the users and are not located in the local farm.
    2. 2.It can’t access the database and the data elements inside it.
    3. 3.It can’t change the threading model and allows the new model to be implemented. No modification can be performed in this area.
    4. 4.It can’t call unmanaged code that is just being written by the developer and implemented.
    5. 5.It doesn’t have the permission to write in the disk as well. It will save a local copy but only the administrator can write the files to the disk.

45.Whats Are The New Delegate Controls In Sharepoint 2013?

Ans:

In SharePoint 2013, three New Delegate Controls have been Introduced for the purpose of displaying the new Top Suite bar (with links SkyDrive, NewsFeed,Sync,follow).
These Controls are :

  • SuiteBarBrandingDelegate delegate Control
  • SuiteLinksDelegate delegate Control
  • PromotedActions Delegate Control

46.What Are The Changes In Csom And Rest Based Apis?

Ans:

Microsoft has improved both Client Side Object Model (CSOM) and Representational State Transfer (REST) based APIs by adding a much needed support for the Search, User Profiles, Taxonomies, and Publishing Object Model.Client.svc service is extended with REST capabilities and accepts HTTP GET, PUT, POST requests.

47.How Does An App For Sharepoint Requests Permissions To Access Sharepoint Resources?

Ans:

An app for SharePoint requests the permissions that it needs during installation from the user who is installing it and then the developer of an app must request, through the app manifest file, the permissions an app needs.

48.What Is The New Spsecurityeventreceiver?

Ans:

SharePoint 2013 Introduces a Cloud App Model that enables you to Create apps.Apps for SharePoint are self-contained pieces of functionality that extend the capabilities of a SharePoint website. An app may include SharePoint components such as lists, workflows, and site pages, but it can also surface a remote web application and remote data in SharePoint.

49.What Are The Differences Between The Two Base Classes And What Are The Inherent Benefits Of Using One Over Another?

Ans:

The difference is the Microsoft.SharePoint.WebPartPages.WebPart base class is meant for backward compatibility with previous versions of SharePoint. The benefit of using the SharePoint WebPart base class is it supported:

  • Cross page connections
  • Connections between Web Parts that are outside of a Web Part zone
  • Client-side connections (Web Part Page Services Component)
  • Data caching infrastructure
  • NET 2.0 WebParts are generally considered better to use because SharePoint is built upon the ASP.NET 2.0 web architecture. Inheriting from the ASP.NET 2.0 base class offers you features that inherit to ASP.NET 2.0, such as embedding resources as opposed to using ClassResources for deployment o

50.What Is The Gac?

Ans:

The GAC stands for the global assembly cache. It is the machine wide code cache which will give custom binaries placed into the full trust code group for SharePoint. Certain SharePoint assets, such as Feature Receivers need full trust to run correctly, and therefore are put into the GAC. You should always try to avoid deployment to the GAC as much as possible since it will possibly allow development code to do more than it was intended to do.

Course Curriculum

Become a Sharepoint Certified Professional to Learn SharePoint Certification Course

Weekday / Weekend BatchesSee Batch Details

51.What Is Strong Naming (signing) A Web Part Assembly File Mean?

Ans:

Signing an assembly with a strong name (a.k.a strong naming) uses a cryptographic key pair that gives a unique identity to a component that is being built. This identity can then be referred to throughout the rest of the environment. In order to install assemblies into the GAC, they must be strongly named. After signing, the binary will have a public key token identifier which can be used to register the component in various other places on the server.

52.What Are Safe Controls, And What Type Of Information, Is Placed In That Element In A Sharepoint Web.config File?

Ans:

When you deploy a WebPart to SharePoint, you must first make it as a safe control to use within SharePoint in the web.config file. Entries made in the safe controls element of SharePoint are encountered by the SharePointHandler object and will be loaded in the SharePoint environment properly, those not will not be loaded and will throw an error.
In the generic safe control entry (this is general, there could be more), there is generally the Assembly name, the namespace, the public key token numeric, the typename, and the safe declaration (whether it is safe or not). There are other optional elements.

53.What Is The Createchildcontrols() Method? How Can You Use It To Do Something Simple Like Displaying A Label Control?

Ans:

The CreateChildControls method in WebParts is used to notify the WebPart that there are child controls that should be output for rendering. Basically, it will add any child ASP.NET controls that are called instantiating each control with its relevant properties set, wire any relevant event handlers to the control, etc.
Then the add method of the control class will add the control to the controls collection. In the relevant WebPart render method, the EnsureChildControls method can be called (or set to false if no child controls should be called) to ensure that the CreateChildControls method is run. When using CreateChildControls it implies that your WebPart contains a composition of child controls.
In order to create something like a label control in Create, you would create a new label control using the new keyword, set the various properties of the control like Visible=True and ForeColor = Color.Red, and then use Controls.Add(myLabelControl) to add the control to the controls collection. Then you can declare EnsureChildControls in the Render method of the WebPart.

54.What Does The Rendercontents Method Do In An Asp.net 2.0 Web Part?

Ans:

The render contents method will render the WebPart content to the writer, usually an HtmlTextWriter since WebParts will output to an HTML stream. RenderContents is used to tell how the controls that are going to be displayed in the WebPart should be rendered on the page.

55.What Is The Webpartmanager Sealed Class? What Is Its Purpose?

Ans:

The WebPartManager sealed class is responsible for managing everything occurring on a WebPart page, such as the WebParts (controls), events, and misc. functionality that will occur in WebPartZones. For example, the WebPartManager is responsible for the functionality that is provided when you are working with moving a WebPart from WebPartZone to WebPartZone. It is known as the central class of the Web Part Control Set.

56.Between Each Of The Objects?

Ans:

The SPSite object represents a collection of sites (site collection [a top level sites and all its subsites]). The SPWeb object represents an instance SharePoint Web, and SPWeb object contains things like the actual content. A SPSite object contains the various subsites and the information regarding them.

57.How Would You Go About Getting A Reference To A Site?

Ans:

  • C#
  • < view plain text >
  • SPSite = new  SPSite(“http:/server”);
  • SPWeb = SPSite.OpenWeb();

58.What Does A SPwebapplication Object Represent?

Ans:

The SPWebApplication object represents a SharePoint Web Application, which essentially is an IIS virtual server. Using the class you can instigate high level operations, such as getting all the features of an entire Web Application instance, or doing high level creation operations like creating new Web Applications through code.

59.Would You Use Spwebapplication To Get Information Like The Smtp Address Of The Sharepoint Site?

Ans:

Yes, since this is a Web Application level setting. You would iterate through each SPWebApplication in the SPWebApplication collection, and then use the appropriate property calls (OutboundMailServiceInstance) in order to return settings regarding the mail service such as the SMTP address.

60.How Do You Connect (reference) To A Sharepoint List, And How Do You Insert A New List Item?

Ans:

  • C#
  • < view plain text >
  • using(SPSite mySite = new SPSite(“yourserver”))
  • {
  • using(SPWeb myWeb = mySite.OpenWeb())
  • {
  • SPList interview List = myWeb.Lists[“list insert”];
  • SPListItem newItem = interview List.Items.Add();
  • newItem[“interview”] = “interview”;
  • newItem.Update();
  • }
  • }

61.How Would You Loop Using Splist Through All Sharepoint List Items, Assuming You Know The Name (in A String Value) Of The List You Want To Iterate Through, And Already Have All The Site Code Written?

Ans:

  • C#
  • < view plain text >
  • SPList interviewList = myWeb.Lists[“listtoiterate”];
  • foreach (SPListItem interview in interviewList)
  • {
  • // Do Something
  • }

62.How Do You Return Sharepoint List Items Using Sharepoint Web Services?

Ans:

In order to retrieve list items from a SharePoint list through Web Services, you should use the lists.asmx web service by establishing a web reference in Visual Studio. The lists.asmx exposes the GetListItems method, which will allow the return of the full content of the list in an XML node.
It will take parameters like the GUID of the name of the list you are querying against, the GUID of the view you are going to query, etc.

63.When Retrieving List Items Using Sharepoint Web Services, How Do You Specify Explicit Credentials To Be Passed To Access The List Items?

Ans:

In order to specify explicit credentials with a Web Service, you generally instantiate the web service, and then using the credentials properties of the Web Service object you use the System.Net.NetworkCredential class to specify the username, password, and domain that you wish to pass when making the web service call and operations.

64.What Is Caml, And Why Would You Use It?

Ans:

CAML stands for Collaborative Application Markup Language. CAML is an XML based language which provides data constructs that build up the SharePoint fields, view, and is used for table definition during site provisioning.
CAML is responsible for rendering data and the resulting HTML that is output to the user in SharePoint. CAML can be used for a variety of circumstances, overall is used to query, build and customize SharePoint based sites.
A general use would be building a CAML query in a SharePoint WebPart in order to retrieve values from a SharePoint list.

65.What Is Impersonation, And When Would You Use Impersonation?

Ans:

Impersonation can basically provide the functionality of executing something in the context of a different identity, for example assigning an account to users with anonymous access. You would use impersonation in order to access resources on behalf of the user with a different account, that normally, that wouldn’t be able to access or execute something.

66.What Is The Idesign Times Html Provider Interface, And When Can You Use It In Webparts?

Ans:

The IDesign Times Html Provider interface uses the function GetDesignTimeHtml() which can contain your relevant render methods. It was helpful to use in 2003 since it allowed your WebPart to have a preview while a page was edited in FrontPage with the Webpart on it, because the GetDesignTimeHtml() method contains the HTML for the designer to render.

67.What Are Webpart Properties, And What Are Some Of The Attributes You See When Declaring Webpart Properties In Code?

Ans:

WebPart properties are just like ASP.NET control properties, they are used to interact with and specify attributes that should be applied to a WebPart by a user. Some of the attributes you see with ASP.NET 2.0 properties are WebDescription, WebDisplayName, Category, Personalizable, and WebBrowsable. Although most of these properties come from the System.Web.UI.WebControls.WebParts class, ones like Category come out of System.ComponentModel namespace.

68.Why Are Properties Important In Web Part Development, And How Have You Exploited Them In Past Development Projects? What Must Each Custom Property Have?

Ans:

Properties are important because WebParts allow levels of personalization for each user. WebPart properties make it possible for a user to interact, adjust, and increase overall experience value with the programmatic assets that you develop without having the need to use an external editor or write any code.
A very simple example of exploiting a property would be something like allowing the user to change the text on the WebPart design interface so that they can display whatever string of text they desire.
Each custom property that you have must have the appropriate get and set accessor methods.

69.What Are Class Resources? How Do You Reference And Deploy Resources With An Asp.net 2.0 Web Part?

Ans:

ClassResources are used when inheriting from the SharePoint.WebPart.WebPartPages.WebPart base class, and are defined in the SharePoint solution file as things that should be stored in the wpresources directory on the server. It is a helpful directory to use in order to deploy custom images. In ASP.NET 2.0, typically things such as images are referenced by embedding them as resources within an assembly. The good part about ClassResources is they can help to eliminate recompiles to change small interface adjustments or alterations to external JavaScript files.

70.What Is A Sharepoint Solution File? How Does It Differ From Webpart .cab Files In Legacy Development? What Does It Contain?

Ans:

A SharePoint solution file is essentially a .cabinet file with all the developers custom components suffixed with a .wsp extension that aids in deployment. The big difference with SharePoint solution files is is that a solution:allows deployment to all WFE’s in a farmis highly manageable from the interface allowing deployment, retraction, and versioningCan package all types of assets like site definitions, feature definitions (and associated components), Webparts, etc.

Sharepoint Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

71.What Is A.ddf File And What Does It Have To Do With Sharepoint Solution Creation?

Ans:

A .ddf file is a data directive file and is used when building the SharePoint solution bundle specifying the source files and their destination locations. The important thing for someone to understand is that the .ddf file will be passed as a parameter to the MAKECAB utility to orchestrate construction of the SharePoint solution file.

72.What File Does A Sharepoint Solution Package Use To Orchestrate (describe) Its Packaged Contents?

Ans:

The solution Manifest.XML file.

73.What Deployment Mechanism Can You Use To Instigate Code Access Security Attributes For Your Web Parts?

Ans:

SharePoint solution files can add in order to handle code access security deployment issues. This is done in the element in the SharePoint solution manifest.XML, which makes it easier to get assemblies the appropriate permissions in order to operate in the bin directory of the web application.

74.What Is A Sharepoint Feature? What Files Are Used To Define A Feature?

Ans:

A SharePoint Feature is a functional component that can be activated and deactivated at various scopes throughout a SharePoint instance, such as at the farm, site collection, web, etc.
Features have their own receiver architecture, which allow you to trap events such as when a feature is installing, uninstalling, activated, or deactivated. They are helpful because they allow ease of upgrades and versioning.
The two files that are used to define a feature are the feature.xml and manifest file. The feature XML file defines the actual feature and will make SharePoint aware of the installed feature. The manifest file contains details about the feature such as functionality.

75.What Types Of Sharepoint Assets Can Be Deployed With A Sharepoint Feature?

Ans:

Features can do a lot. For example, you could deploy

  • Simple site customizations
  • Custom site navigation
  • WebParts
  • pages
  • list types
  • list instances
  • event handlers
  • workflows
  • custom actions
  • just to name a few

76.What Are Event Receivers?

Ans:

Event receivers are classes that inherit from the SpItemEventReceiver or SPListEventReceiver base class (both of which derive out of the abstract base class SpEventReceiver Base), and provide the option of responding to events as they occur within SharePoint, such as adding an item or deleting an item.

77.When Would You Use An Event Receiver?

Ans:

Since event receivers respond to events, you could use a receiver for something as simple as canceling an action, such as deleting a document library by using the Cancel property. This would essentially prevent users from deleting any documents if you wanted to maintain retention of stored data.

78.What Base Class Do Event Receivers Inherit From?

Ans:

Event receivers either inherit from the SPListEventReceiver base class or the SPItemEventReceiver base class, both which derive from the abstract base class SPEventReceiverBase.

79.What Is The Difference Between An Asynchronous And Synchronous Event Receiver?

Ans:

An asynchronous event occurs after an action has taken place, and a synchronous event occurs before an action has taken place. For example, an asynchronous event is ItemAdded, and its sister synchronous event is ItemAdding.

80.How Could You Append A String To The Title Of A Site When It Is Provisioned?

Ans:

  • In the OnActivated event:
  • C#
  • < view plain text >
  • SPWeb site = siteCollection.RootWeb;
  • site.Title+=”interview”;
  • site.Update();

81.Can An Event Receiver Be Deployed Through A Sharepoint Feature?

Ans:

Yes.

82.What Is A Content Type?

Ans:

A content type is an information blueprint that can be re-used throughout a SharePoint environment for defining things like metadata and associated behaviors. It is basically an extension of a SharePoint list, however makes it portable for use throughout an instance regardless of where the instantiation occurs, ergo has location independence.
Multiple content types can exist in one document library assuming that the appropriate document library settings are enabled. The content type will contain things like the metadata, listform pages, workflows, templates (if a document content type), and associated custom written functionality.

83.Can A Content Type Have Receivers Associated With It?

Ans:

Yes, a content type can have an event receiver associated with it, either inheriting from the SPListEventReceiver base class for list level events, or inheriting from the SPItemEventReceiver base class. Whenever the content type is instantiated, it will be subject to the event receivers that are associated with it.

84.What Two Files Are Typically (this Is Kept Generally) Included When Developing A Content Type, And What Is The Purpose Of Each?

Ans:

There is generally the main content type file that holds things like the content type ID, name, group, description, and version. There is also the ContentType.Fields file which contains the fields to include in the content type that has the ID, Type, Name, DisplayName, StaticName, Hidden, Required, and Sealed elements. They are related by the FieldRefs element in the main content type file.

85.What Is An Ancestral Type And What Does It Have To Do With Content Types?

Ans:

An ancestral type is the base type that the content type is deriving from, such as Document (0×0101). The ancestral type will define the metadata fields that are included with the custom content type.

86.Can A List Definition Be Derived From A Custom Content Type?

Ans:

Yes, a list definition can derive from a content type which can be seen in the schema.XML of the list definition in the element.

87.When Creating A List Definition, How Can You Create An Instance Of The List?

Ans:

You can create a new instance of a list by creating an instance.XML file.

88.What Is A Field Control?

Ans:

Field controls are simple ASP.NET 2.0 server controls that provide the basic field functionality of SharePoint. They provide basic general functionality such as displaying or editing list data as it appears on SharePoint list pages.

89.What Base Class Do Custom Field Controls Inherit From?

Ans:

This varies. Generally, custom field controls inherit from the Microsoft.SharePoint.WebControls.BaseFieldControl namespace, but you can inherit from the default field controls.

90.What Is A Sharepoint Site Definition? What Is Ghosted (uncustomized) And Unghosted (customized)?

Ans:

SharePoint site definitions are the core set of functionality from which SharePoint site are built from, building from the SiteTemplates directory in the SharePoint 12 hive.
Site definitions allow several sites to inherit from a core set of files on the file system, although appear to have unique pages, thereby increasing performance and allowing changes that happen to a site propagate to all sites that inherit from a site definition.
Ghosted means that when SharePoint creates a new site it will reference the files in the related site definition upon site provisioning.
Unghosted means that the site has been edited with an external editor, and therefore the customizations are instead stored in the database, breaking the inheritance of those files from the file system.

91.What Does Cmdui.xml Contain?

Ans:

The definitions for the out-of-the-box ribbon elements are split across several files in the SharePoint root, with TEMPLATE GLOBAL XML CMDUI.XML being the main one.

92.Why Would You Use Linq Over Caml For Data Retrieval?

Ans:


Unlike CAML, with LINQ to SharePoint provider, you are working with strongly typed list item objects. For example, an item in the Announcements list is an object of type Announcement and an item on a Tasks list is an object of type Task. You can then enumerate the objects and get the properties for your use. Also, you can use LINQ syntax and the LINQ keywords built into C# and VB for LINQ queries.

93.What Is Difference Between Load() And Loadquery() Methods ?

Ans:

Load method populates the client object directly with what it gets data from the server i.e. a collection object like ListItemCollection etc. but LoadQuery returns the data as a completely new collection in IEnumerable format.
Other major difference is that the Collections that you load using the Load() method are eligible for garbage collection only when the client context variable itself goes out of scope where as, in these collections go out of scope at the end of IEnumerable list

94.How Do You Access Ecmascript Object Model Api?

Ans:

The ECMAScript library is available in a number of JS files in the LAYOUTS folder. The main file among a number of .js files is SP.js. When you include this file in the ASPX page using a ScriptLink control, all other required JS files are loaded automatically.
By linking SP.js to your page, the SP namespace gets registered. SP is the SharePoint namespace that contains all objects. For debugging purposes every js file also has a ‘debug’ equivalent in the same folder.

95.What Is The Purpose Of Calling Clientcontext.executequery()?

Ans:

ExecuteQuery gives you the option to minimize the number of roundtrips to the server from your client code. All the components loaded into the clientcontext are executed in one go.

96.Can You Deploy .wsp Solutions From Sharepoint 2010 In Sharepoint 2013?

Ans:

Yes. SharePoint 2013 provides Support for both 14 Hive and 15 Hive. Solutions from SharePoint 2010 can be deployed in SharePoint 2013 either in 14 Hive,15 Hive or both. This can be done using the new “CompatibilityLevel” parameter of Install-SPSolution cmdlet with which you can now Deploy your wsp Solutions to 14 hive, 15 hive or both.

97.Can You Create & Deploy Sandbox Solutions In Sharepoint 2013?

Ans:

Sandbox Solutions are deprecated in SharePoint 2013.You can still Create them and deploy them but they are not supported by Microsoft (not 100% sure about this though).

98.What Is The New Js Link Property On Spfield?

Ans:

New “SPField.JSLink” property has been added to help specify any external JavaScript file Containing any Rendering logic for Out-of-Box or Custom field type.With JSLink developers can now Control the Rendering (the presentation and validation) of any Field (Custom or Out-of-box) on List forms as well as in Views by simply adding a reference to an External or deployed JavaScript file.

99.Is Callout Popups A Replacement To Dialogs In Sharepoint 2013?

Ans:

No. Dialog Framework still exists.

100.Can We View Pdf Files In Callout Popups?

Ans:

Yes. A Custom Result type and Display template would be needed.

101.What are picture libraries?

Ans:

Picture libraries allow you to access a photo album and view it as a slideshow or thumbnails or a film strip. You can have a separate folder for each event, category, etc

102.What are the Hardware and Software requirements for SharePoint 2010?

Ans:

 Hardware requirements: Processor 64-bit, four-core, 2.5 GHz minimum per core. RAM 4 GB for developer or evaluation use, 8 GB for single server and multiple server farm installation for production use. Hard disk 80 GB for installation: For production use, the users need additional free disk space for day-to-day operations. Add twice as much free space as the users have RAM for production environments. Software requirements: The 64-bit edition of Windows Server 2008 Standard with SP2. If the users are running Windows Server 2008 without SP2, the Microsoft SharePoint Products and Technologies 2010 Preparation Tool installs Windows Server 2008 SP2 automatically.

103.What are the advantages of Service Applications over SSP?

Ans:

The key limitation of the SSP architecture was that it was configured by using a set of services, and all Web applications associated with the SSP bore the overhead of all the services even if they weren’t being used. To change the service configuration for a particular Web application, a new SSP would have to be created. The service application architecture, on the other hand, allows a set of services to be associated with a given Web application and a different set of services to be associated with another Web application. Also, the same service application can be configured differently in different Web applications; therefore, Web sites can be configured to use only the services that are needed, rather than the entire bank of services.

Are you looking training with Right Jobs?

Contact Us

Popular Courses