Posts

Showing posts from January, 2011

Create the Edit Control Block Menu Item

  The solution that you create in this walkthrough creates a list item context menu entry for Microsoft Word .docx files. When users open the document context menu for a given .docx file, they can click the new entry to initiate the conversion of the document. To modify the ECB menu, you create a new feature and then add a new context menu item. To create a feature      1.In the Solution Explorer, right-click Features, and then click Add Feature.    2.Type a title for the feature; for example, Convert Document.    3.Type a description for the feature; for example, This feature converts Word Open XML documents by using Word Automation Services.    4.Accept the Web default feature scope, which gives the SharePoint Server 2010 farm administrators the ability to enable or disable the feature on a per-site basis.   After you create the feature, add the new context menu item. To add a context menu item      1.In the Solution Explorer, right-click the project, point to Add, and then

Add Solution / Deploy Solution

Hi, If you want to install a wsp file in SharePoint, you can use these script to install : Command # 1 : This command will add the solution in SharePoint ( Reference ) "%CommonProgramFiles%\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o addsolution -filename C:\Gaurav\SPSolution.TaskListRollup.wsp Command # 2 : This command will deploy the solution in SharePoint ( Reference ) "%CommonProgramFiles%\Microsoft Shared\web server extensions\14\BIN\stsadm.exe" -o deploysolution -name SPSolution. TaskListRollup .wsp -local -allowgacdeployment –allcontenturls Enjoy !

Hide Web Part Headers with SharePoint 2010

Hide a web part header in SharePoint 2010. 1.  Add a content editor web part to your page. 2. Edit the Web Part 3. Click in the content area of the web part, click HTML and select “Edit HTML Source” 4. Put the following code in the web part:    <style>       TR.ms-viewheadertr > TH.ms-vh2 {       DISPLAY: none       }    </style> 5. Click “OK” 6. Expand “Appearance” (on the right side of the page) 7. Set the chrome type to “None” 8. Click “OK” and then save and check in your page. The headers of your web part should now be hidden.  This can be extremely helpful when your page contains a web part using “boxed” for your style when creating a list view.  The only downside to this approach is if you have multiple web parts on a single page, it will hide the headers for all the web parts on your site.

Add custom menu actions programmatically in SharePoint 2010

using ( SPSite site = new SPSite ( "http://moss.dev.com" )) {         using ( SPWeb web = site . OpenWeb ())         {             SPContentType contentType = web . ContentTypes [ "Curriculum Vitae" ];             SPUserCustomAction action = web . UserCustomActions . Add ();             action . RegistrationType = SPUserCustomActionRegistrationType . ContentType ;             action . RegistrationId = contentType . Id . ToString ();             action . Location = "EditControlBlock" ;             action . Sequence = 450 ;             action . Title = "Test" ;             action . Rights = SPBasePermissions . EditListItems ;             action . Url = "http://www.google.com" ;             action . Update ();         } }

Add favicon icon to site

Add favicon icon to site In SharePoint if you need to add favicon, you can do so easily by using SharePoint Out-of-box control SPShortcutIcon. The following code snippet shows how you can set the favicon: <SharePoint:SPShortcutIcon runat=”server” IconUrl=”YourIconUrl”/>

Steps to set Form based authentication (FBA) for SharePoint 2010

Image
1.        DOWNLOAD FBA User Management Tool           Go to “C:\Windows\Microsoft.NET\Framework\v2.0.50727”. 2.        Open file “aspnet_regsql.exe” (with Run as Administrator).                                 I.             You will get an installation form. Hit “Next” button.                               II.             Click on “Configure SQL Server for application services” then hit “Next” button.                             III.             Now provide server name to connect & install new database for Membership. Now hit “Next” button.                             IV.             Now you get a summary page on which you will get server name & its new database name called “aspnetdb”. Click on “Next” button.                               V.             Now database has been created. Click on “Finish” button. 3.        Install FBA tool. 4.        Create a new Site collection (suppose we called it “A”). 5.        Extend this site (Suppose we called it “B”).