What is difference between SPContext.Current.Web and SPContext.Current.Site.OpenWeb()
|
|
To refer SPWeb object sometimes we use SPContext.Current.Web or SPContext.Current.Site.OpenWeb(). Here we will see What are differences between SPContext.Current.Web and SPContext.Current.Site.OpenWeb() SPContext.Current.Site.OpenWeb()- Creates a new instance of the SPWeb object, and we are responsible to dispose after using it.
- OpenWeb() with out sending parameters opens root web of current site collection. If OpenWeb() with parameters opens specific web site.
- Expensive call - It cost more resources than reusing an existing one.
SPContext.Current.Web :- Gives you access to the current instance of SPWeb, and you must not dispose it
- Gives current Subsite if you are at web other than root web.
|
|
|
What is Site Columns in SharePoint
|
|
Site Columns are re-usable data type model which can be used in many different content types and list definitions across multiple SharePoint sites. Site Columns shares metadata information across multiple list and libraries. If we define Site Column at root level site of site collection then it can be used across all sub sites in same site collection.
Inbuilt SharePoint site creates many site columns when we create a new site. We can find them at Site Settings -> Web Designer Galleries -> Site columns. We can create our own Site Column using Create link button from Site Columns page. Each Site Column will be mapped to a Group and Type.
|
|
|
What are the view formats for SharePoint Custom List template
|
|
When we create a Custom List in SharePoint site, we need to map the list to View. By default when we create List, it will be mapped to "All Items" standard view. But we can change the view for the list.
Each view is created from View Type and below are the available view types - Standard View - View data on a Web page. You can choose from a list of display styles.
- Calendar View - View data as a daily, weekly, or monthly calendar.
- Datasheet View - View data in an editable spreadsheet format that is convenient for bulk editing and quick customization.
- Gantt View - View list items in a Gantt chart to see a graphical representation of how a team's tasks relate over time.
- Custom View in SharePoint Designer - Start SharePoint Designer to create a new view for this list with capabilities such as conditional formatting.
In order to see the available view types, Go to Custom List Settings -> Create View -> View Type.
|
|
|
What are the default columns added to SharePoint Custom List template
|
|
When we create a Custom List in SharePoint site, By default 5 columns are added to custom list which are - Title (Single line of text) - Mandatory field that defines a title for each list item.
- Created (Date and Time) - When the user has created the current item.
- Modified (Date and Time) - When the last user has modified the current item.
- Created By (Person or Group) - User who created the current item.
- Modified By (Person or Group) - User who last modified the current item.
We can modify the column properties by clicking on Column Name from List Settings.
|
|
|
What is custom list template in sharepoint site
|
|
Inbuilt SharePoint provides some predefined list of templates like Announcements,Calendar,Picture Library,Links...etc. If none of templates are meeting you requirement, you can create your own custom list instance and define columns/views for the list. This list is called Custom List.
In-order to create new custom list, Go to Site Contents -> Add an App -> Select Custom List -> Provide Name for Your Custom list.After creating list, add columns and views to it. Create Column/View for List: Open created Custom List -> List Settings -> Create Column/View
Note: By default every Custom List will have 5 columns (Title, Modified, Created, Created By and Modified By).
|
|
|
What are the various default permission levels in SharePoint site
|
|
SharePoint site has different permission levels for the SharePoint Groups. When you create SharePoint site, you can observe the below permissions as default.
Full Control - Has full control. Design - Can view, add, update, delete, approve, and customize. Edit - Can add, edit and delete lists; can view, add, update and delete list items and documents. Contribute - Can view, add, update, and delete list items and documents. Read - Can view pages and list items and download documents. Limited Access - Can view specific lists, document libraries, list items, folders, or documents when given permissions. Approve - Can edit and approve pages, list items, and documents. Manage Hierarchy - Can create sites and edit pages, list items, and documents. Restricted Read - Can view pages and documents, but cannot view historical versions or user permissions. Restricted Interfaces for Translation - Can open lists and folders, and use remote interfaces.
We can create our own set of permissions also. In order to create new permission, go to site settings -> Users and Permissions -> Site permissions -> Permission Levels(Display list of permissions avalible on site) -> Add a Permission Level
|
|
|
What is site template in sharepoint
|
|
Site Template is a pre-defined set of configuration, layout, and content files that define a site model for an SharePoint application. In built SharePoint has shipped with the set of site templates or we can create our own site templates.
Each site collection site is associated with a site template. While creating a new site collection for an web application from Central Admin, we need to select a site template from Template Selection section.
Once we crate site collection, share point stores some of the files in the file system of front-end webs servers and some content in back-end databases. When we request for a page from browser, SharePoint engine will decide from where it needs to pick the data either file system or content database.
Sample Site Templates: Collaboration - Team Site Collaboration - Blog Collaboration - Coommunity Site Enterprise - Document Center Publishing - Publishing Portal Publishing - Enterprise Wiki
|
|
|
What is Service Applications in SharePoint
|
|
Service Applications(SA) are software services which run in a SharePoint farm. These are very useful to share information, resources and capabilities across multiple sites/applications/servers in the same share point farm or even across farms.
Service applications are introduced from SharePoint 2010. Advantage with the Service Applications are salable and extensible.
Sample Service Applications: Access Services User Profile Service User Profile Synchronization Service SharePoint Server Search ...
Location of services : Central Administration -> System Settings -> Manage services on server
|
|
|
What is content database in SharePoint
|
|
A content database is a database file that stores content for one or more site collections for SharePoint web application. The content can be pages,files,documents,images and much more. So if the Site Collection has more number of SharePoint sites, the content database size grows rapidly.
One SharePoint web application can have more than one content database mapped to it and the max limit is 300 ContentDB's per Web Application. If you want to add more content databases to web application, Go to Central Admin -> Application Management -> Manage Content Databases -> select web application -> Add a content database.
Maximum Content database size is 200 GB in general usage scenarios.
|
|
|
|
|
SharePoint UserProfile image asking for credentials again
|
|
Sometimes we need to show user profile image(to left menu or list of users profiles to grid) from SharePoint UserProfiles. While fetching user profile images, we faced an issue like site was asking for user credentials again even user logged into SharePoint site. In this article we will see the resolution for the issue.
|
|
|
|
|
|
|
What are the deployment models for Apps in SharePoint
|
|
The deployment models for Apps in SharePoint are - SharePoint-hosted - App and all resources will be hosted in your SharePoint farm. Used for light weight smaller applications using HTML,Java Script and Client object model. Here you do not need to write server-side code. scope is site collection level.
- Autohosted - App is hosted in cloud. Used for light weight applications but the code is deployed at windows azure using cloud. scope is at site level.
- Provider-hosted - App and all resources are hosted on separate server. Code does not exists on SharePoint but will be in other domain which can be windows azure, IIS or even PHP app from your domain server.
No matter where you host your app, it should target to support and consumable in SharePoint Apps.
|
|
|
|
|
|
|