Monday, October 6, 2014
How to edit a page that has no “Edit Page” menu option in SharePoint( 2010 ,2013)
Posted by
Santhosh,
on
8:08 AM
Some times we come across a situation where we can t find the edit button in ribbon even if we have full control .
Solution :
Add the below parameter to your URL .
?ToolPaneView=2&pagemode=edit\
sample URL :http://SharePointSite/pages/sample.aspx?ToolPaneView=2&pagemode=edit
Wednesday, August 27, 2014
Quering the listitems from without using Caml Builder setup
Posted by
Santhosh,
on
6:44 AM
Quering the List Items from List and Doc Library without using Caml Builder setup
Quering the listitems from without using Caml Builder setup
Hi Guys ,
Generally, We do install cam builder setup in order to query the list items from list .
Now we can also retrieve the list items without the cam builder setup .
the only thing we need to do is to deploy the wsp and activate the feature like how we do regular wsp deployment
Get the Wsp from the link "http://www.u2u.be/Downloads/U2U.SharePoint.CQB2010.zip" (thanks to the one who made it for us )
After that open the list which u want to query, inside ribbon you can see the caml query icon , click on it explore the options available inside it .
Please go through it and use this feature if it is helpful .
Quering the listitems from without using Caml Builder setup
Hi Guys ,
Generally, We do install cam builder setup in order to query the list items from list .
Now we can also retrieve the list items without the cam builder setup .
the only thing we need to do is to deploy the wsp and activate the feature like how we do regular wsp deployment
Get the Wsp from the link "http://www.u2u.be/Downloads/U2U.SharePoint.CQB2010.zip" (thanks to the one who made it for us )
After that open the list which u want to query, inside ribbon you can see the caml query icon , click on it explore the options available inside it .
Please go through it and use this feature if it is helpful .
Friday, August 22, 2014
Posted by
Santhosh,
on
7:21 AM
STSADM Commands and Power Shell Commands for Deploying ,Installing activating feature
stsadm –o addsolution –filename “D:\Deploy\MySharePointSolution.wsp“
We used the following command to deploy the solution once installed to a specific web application:
stsadm –o deploysolution –name MySharePointSolution.wsp –url http://myspwebappp –allowgacdeployment –immediate
If we would upgrade an existing solution, we would use the following:
stsadm –o upgradesolution –name MySharePointSolution.wsp –filename “D:\Deploy\MySharePointSolution.wsp” -immediate
And finally, we used the following commands to retract and delete a specific solution from the web application:
stsadm –o retractsolution –name MySharePointSolution.wsp –url http://myspwebapp –immediate
stsadm –o deletesolution –name MySharePointSolution.wsp
Now, let us see how we could do above operations with PowerShell. For this, we use the following PowerShell commands:
Add-SPSolution “D:\Deploy\MySharePointSolution.wsp“
Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp –GACDeployment
If you would like to add the solution as sandboxed, you would use the Install-SPUserSolution command instead. To upgrade a solution, we specify which solution is to be updated and with which new solution file:
Update-SPSolution –Identity MySharePointSolution.wsp –LiteralPath “D:\Deploy\MySharePointSolution.wsp” –GacDeployment
To retract and remove a solution, we use the following commands:
Uninstall-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp
Remove-SPSolution–Identity MySharePointSolution.wsp
stsadm –o activatefeature –name MyFeatureName –url http://myspwebapp
stsadm –o deactivatefeature –name MyFeatureName –url http://myspwebapp
Needless to say, there are easy equivalents in PowerShell:
Enable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp
Disable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp
stsadm –o addsolution –filename “D:\Deploy\MySharePointSolution.wsp“
We used the following command to deploy the solution once installed to a specific web application:
stsadm –o deploysolution –name MySharePointSolution.wsp –url http://myspwebappp –allowgacdeployment –immediate
If we would upgrade an existing solution, we would use the following:
stsadm –o upgradesolution –name MySharePointSolution.wsp –filename “D:\Deploy\MySharePointSolution.wsp” -immediate
And finally, we used the following commands to retract and delete a specific solution from the web application:
stsadm –o retractsolution –name MySharePointSolution.wsp –url http://myspwebapp –immediate
stsadm –o deletesolution –name MySharePointSolution.wsp
Now, let us see how we could do above operations with PowerShell. For this, we use the following PowerShell commands:
Add-SPSolution “D:\Deploy\MySharePointSolution.wsp“
Install-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp –GACDeployment
If you would like to add the solution as sandboxed, you would use the Install-SPUserSolution command instead. To upgrade a solution, we specify which solution is to be updated and with which new solution file:
Update-SPSolution –Identity MySharePointSolution.wsp –LiteralPath “D:\Deploy\MySharePointSolution.wsp” –GacDeployment
To retract and remove a solution, we use the following commands:
Uninstall-SPSolution –Identity MySharePointSolution.wsp –WebApplication http://myspwebapp
Remove-SPSolution–Identity MySharePointSolution.wsp
Working with features
Similarly, commands exist for working with features. The stsadm equivalents:stsadm –o activatefeature –name MyFeatureName –url http://myspwebapp
stsadm –o deactivatefeature –name MyFeatureName –url http://myspwebapp
Needless to say, there are easy equivalents in PowerShell:
Enable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp
Disable-SPFeature –Identity MyFeatureNameOrGuid –url http://myspwebapp
Tuesday, July 29, 2014
Posted by
Santhosh,
on
8:23 AM
Delegate Controls in SharePoint 2010 and 2013
For More Information on SharePoint 2013 Delegate Controls
http://zimmergren.net/technical/sp-2013-some-new-delegatecontrol-additions-to-the-sharepoint-2013-master-pages
Delegate Controls
The Purpose of Delegate Controls is to Achieve the Customized functionality inside a master page without touching the Master Page
Generally, Whenever we Create Master Page in SharePoint it comes up with Some out of box delegate Controls .
These Delegate controls has got some default functionality assigned by Microsoft guys
. So in case if we want to Override (means replacing the Default functionality with New Functionality ) the delgate Controls . through Visual Studio we can do this activity.
The below Delegate Controls are by default available in Master Page .
- GlobalNavigation.
- SmallSearchInputBox.
- QuickLaunchDataSource.
- AdditionalPageHead.
1. Create new Empty Sharepoint Project
2. Create a new User Control and add some stuff in it.
3. Add Empty Elemnt.xml file
Empty Elemnt.xml : Inside the Element.XML File we are Intergrating the UserControl with Delgate Control in SharePoint Matser Page .
4. Deploy and See in Master Page
Not only we overide the Exsiting Delegate Controls we can also create new Delegate Controls .
- Sequence numbers. These numbers determine which control will be loaded in a delegate control. A delegate control can only have one control, unless AllowMultipleControls is set to true (See the second note just below). The control with the lowest sequence number will be the one rendered in the page.
- The AllowMultipleControls gives the developer the option to load several controls one after the other. This means that a custom delegate control will not replace an existing one and the order will be determined by the sequence number.
AdditionalPageHead
<SharePoint:DelegateControl runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/>
This delegate control allows the developer to add multiple html head lines. They will be rendered together with the ones SharePoint adds already there out of the box. For instance, we could load different .js libraries without modifying the existing MasterPage, or even build some logic behind our specific delegate control to load a JS library based on the logged user credentials.
GlobalNavigation
<SharePoint:DelegateControl runat="server" ControlId="GlobalNavigation"/>
This delegate control is used to add content at the top of the page, even on top of the “Site Actions” or “Welcome ID” Controls. SharePoint out of the box is using this delegate control to add some custom links, such as “My Network”, “My Content” and “My Profile” when we access our “My Site”.
GlobalSiteLink0
<SharePoint:DelegateControl runat="server" ID="GlobalDelegate0" ControlId="GlobalSiteLink0" />
This delegate control is used by SharePoint to place the Variations Menu. If we had multiple languages enabled in our site, we would be able to choose the appropriate language leveraged by the control “VariationsLabelMenu.ascx” placed within this delegate control.
GlobalSiteLink2
<SharePoint:DelegateControl ControlId="GlobalSiteLink2" ID="GlobalDelegate2" Scope="Farm" runat="server" />
SharePoint will use this delegate control to place a Social Delegate Control called “socialdata.ascx”. This control is the one in charge to render the links to “My Site” and “My Profile” when we expand the Welcome ID control.
PublishingConsole
<SharePoint:DelegateControl runat="server" ControlId="PublishingConsole" Id="PublishingConsoleDelegate">
This control is the one rendering the dynamic publishing console. We should call it Server Ribbon when we are referring to SharePoint 2010. This Server Ribbon is the component that enables the end-user, and content editors, to work with SharePoint as a full WYSIWYG CMS. It renders all buttons, tabs, contextual tabs and contextual tab groups that appear while working with pages, documents or SharePoint content in general. It is not necessary now, with SharePoint 2010, to tweak this control in order to add buttons and/or tabs, you can use some other supported way to add them to the Ribbon (it could be another topic to blog about in the future).
GlobalSiteLink3
<SharePoint:DelegateControl ControlId="GlobalSiteLink3" Scope="Farm" runat="server"/>
Renders two image links that are used to tag the current Page and open the SocialDataFrame.aspx page, allowing the user to manage the social tags and notes that are associated with the current Page.
SmallSearchInputBox
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4"/>
This delegate control renders the small search box. This search box control leverages the search functionality as it’s been configured in Site Collection Administration, such as whether to show the search scopes etc… you could build your own Search Input Box component and replace it wherever your feature is activated.
TopNavigationDataSource & QuickLaunchDataSource
<SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
<SharePoint:DelegateControl runat="server" ControlId="QuickLaunchDataSource">
I covered these two delegate controls with my post about custom Top and QuickLaunch menus. Just to give you an intro to this subject I could say that with these delegate controls we can override the datasources that feed the top menu and quicklaunch menu. Therefore you can customize the links that appear dynamically or show/hide links based on any business requirement.
TreeViewAndDataSource
<SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">
This delegate control wraps together a DataSource and a TreeView control. This control is rendering the content provided by the datasource. So, as you can see, this is a pretty self-enclosed and neat solution. If you dive a bit deeper into the FEATURES folder within the 14 hive you will see this delegate control is used not only at MasterPage level but also in several application pages, mainly the ones giving you the option to pick up files, such as upload.aspx or Picture Library pages.
SharePoint 2013 Delegate Controls
And now that SharePoint 2013 is available, you can find what's been added to the Delegate Controls collection here... http://www.helpmeonsharepoint.com/2012/07/sharepoint-2013-new-delegate-controls.html
Thursday, July 3, 2014
Posted by
Santhosh,
on
2:42 AM
How to check Event Receiver is Attached or not ..to specific list/Library
Sometimes we come across a situation where we want to check event reciver is attached to list/library .
At that time if we run the below power Shell Script in Management Power Shell . then we can easily identify the event reciver attached to the list .
$web = Get-SPWeb "Server URL"
#$web=$site.OpenWeb();
$spList = $web.Lists["List/Library Name"]
$spList.EventReceivers | Select Name, Assembly, Type
Need to Save the file As .ps1 and open Managemnet Power sheel as admin run the path
Sometimes we come across a situation where we want to check event reciver is attached to list/library .
At that time if we run the below power Shell Script in Management Power Shell . then we can easily identify the event reciver attached to the list .
$web = Get-SPWeb "Server URL"
#$web=$site.OpenWeb();
$spList = $web.Lists["List/Library Name"]
$spList.EventReceivers | Select Name, Assembly, Type
Need to Save the file As .ps1 and open Managemnet Power sheel as admin run the path
Tuesday, June 24, 2014
Posted by
Santhosh,
on
8:39 PM
Create Site Using Client Object Model in .net Model
In C# ,
In Order to work with .net managed Code ,We need to refer Microsoft.SharePoint.Client.dll from ISAPI folder in 15 hive .
Once this is done,we can write a Windows or Console Application for creating a Sample Site Creation .
In C# ,
In Order to work with .net managed Code ,We need to refer Microsoft.SharePoint.Client.dll from ISAPI folder in 15 hive .
Once this is done,we can write a Windows or Console Application for creating a Sample Site Creation .
string siteDescription="New Site created using .net Managed Client";
siteTitle="TestSite";
siteUrl="http://servername/"
public void CreateSite(string siteDescription, string siteTitle, string siteUrl)
{
rootWeb = rootWeb.Webs.Add(new WebCreationInformation
{
Description = siteDescription,
Title = siteTitle,
Url = siteUrl,
UseSamePermissionsAsParentSite = false
});
clientContext.ExecuteQuery();
}
Subscribe to:
Posts
(
Atom
)



