Exploring SharePoint Publishing Feature to Configure From Onet.xml

When you create your own publishing site definition then you can configure SharePoint out of the box publishing feature in onet.xmlnnnExample: when you open onet.xml of existing publishing site definition then you find publishing feature configured like this:nn<Feature ID=”22A9EF51-737B-4ff2-9346-694633FE4416″>nnn<Properties xmlns=”http://schemas.microsoft.com/sharepoint/”>nnn<Property Key=”ChromeMasterUrl” Value=””/>nnn<Property Key=”WelcomePageUrl” Value=”$Resources:cmscore,List_Pages_UrlName;/default.aspx”/>nnn<Property Key=”PagesListUrl” Value=””/>nnn<Property Key=”AvailableWebTemplates” Value=””/>nnn<Property Key=”AvailablePageLayouts” Value=””/>nn<Property Key=”SimplePublishing” Value=”true” />nnn</Properties>nnn</Feature>nnSo you can … Read more

Adding Entries in SharePoint Web Configuration File using SPWebConfigModification

nOne of requirement in my project was to edit the web.config of the current SharePoint web application. After some goggling I came to know that SharePoint provides us the powerful API (SPWebConfigModification)  to interact with web.config directly. So I will be explaining some points that how to use this API: I created a feature at … Read more

Get SharePoint WebApplication/Application Pool owner's password

Hi All,I was trying to get the username and the password for the sharepoint webapplication owner.after long searching in this thing I came up with one short custom solution and this can be done like this:SPWebApplication webApp = SPContext.Current.Site.WebApplication; string userName =webApp.ApplicationPool.Username; string password == webApp.ApplicationPool.Password; this gets the username and password of the Application … Read more

Exciting Tool – stsadm

Hello All, We all know that sharepoint central administration is the great UI which allows us to to all administration operation for the sharepoint. but there is something more powerful command line tool in sharepoint known as STSADM. location:- 12\BIN\STSADM.EXE here is the link to all stsadm commands : all stsadm commands there is some … Read more

Working with SharePoint Item Events

Hello All, before some days I was working with the SharePoint list items and their events. I just wanted to add small suggestion here that while working with the SPItemEventReceiver class or with the class that inherits from SPItemEventReceiver, we oftenly override the methods like ItemAdding , ItemAdded, ItemUpdating, ItemUpdated…..etc so many times scenario comes … Read more

Get HTML of .aspx page

Hello All, before some days I was working with the .aspx pages and got in the situation that I needed the source of the page from code. I am posting this small code snippet might be useful for others also (Note:- There might be some issue while getting html source from the web page due … Read more