Welcome to MSDN Blogs Sign in | Join | Help

March 2006 - Posts

SharePoint: How to retrieve specific version of file from a document library thro’ programmatically?

The SPFile.Versions API can be used to retrieve the specific version of the document library. I have compiled a sample code snippet to retrieve the specific version of the document library. //Open the web SPWeb web = new SPSite("http://karthickmain:9091/sites/siteb").OpenWeb();
Posted by Karthikeyan | 3 Comments
Filed under:

SharePoint: How to add news listings to the News Area thro’ programmatically

I compiled a sample piece of code snippet to add news listings to the news area. //Site object SPSite site = new SPSite("http://karthickmain:9090"); //Get the portal context PortalContext context = PortalApplication.GetContext(site.ID); //Get the news
Posted by Karthikeyan | 2 Comments
Filed under:

SharePoint: PortalContext – gives “Value cannot be null. Parameter name: site”

I came across the following problem in PortalContext API. Say I have created a portal with port number 9091. I am using the following code snippet to retrieve the portal context. [working though we changed the port number] TopologyManager tm = new TopologyManager();
Posted by Karthikeyan | 1 Comments
Filed under:

SharePoint: How to retrieve the list of item from the Sub folders by using Lists.asmx web service

Unfortunately SPS SDK doesn’t provide sample to get the details from the subfolder. I have compiled a sample code snippet to achieve it. Here you go for the code. localhost.Lists listService = new localhost.Lists(); listService.Credentials = System.Net.CredentialCache.DefaultCredentials;
Posted by Karthikeyan | 1 Comments
Filed under:

SharePoint : SPWeb.AlternateHeader issue – does not accept empty “” string

Recently I see this problem in SPWeb object. I have configured the alternate header in the onet.xml. I created the sites. Now I want to revert back the alternate header configured and set it to empty. As we know already, what ever the modification made
Posted by Karthikeyan | 0 Comments
Filed under:

MCMS 2002 : List of some important hotfixes for CMS 2002 SP2

912356 - The Web server may stop responding when you try to generate a channel path by using the MCMS API in Content Management Server 2002 913400 - You receive an error message when you try to use SQL authentication mode in the Database Configuration

SharePoint : Programmatically access "Manage crawls of Site Directory"

Programmatically access "Manage crawls of Site Directory" The Manage Crawls of Site directory is a Area Listing as like Best Bet Keywords. The following piece of code snippet can be used to access the "Manage crawls of Site Directory" through SPS object
Posted by Karthikeyan | 1 Comments
Filed under:

SharePoint : Add group of users to the user collection programmatically

The sample code as follows. SPWeb web = new SPSite(" Site URL").OpenWeb (); SPUserInfo[] userInfo = new SPUserInfo[1]; userInfo[0].Email = " email@microsoft.com "; userInfo[0].LoginName = @"domain\username"; userInfo[0].Name = "username"; userInfo[0].Notes
Posted by Karthikeyan | 5 Comments
Filed under:

SharePoint : .net 2.0 and SQL Server 2005 Supportability

Windows SharePoint Services (WSS) Support for running on 64-bit systems in 32-bit emulation mode Support for reverse proxy Support for IP-bound virtual servers Support for off-box SSL termination Support for Microsoft SQL Server 2005 Support for ASP.net
Posted by Karthikeyan | 0 Comments
Filed under:

SharePoint : Top Area Navigation Drop Down Menu Control

This menu control works based on external JavaScript and CSS file. These files are sample only. Follow the following steps to install the web control into the page. Step 1: Create Web Control (I know you know all these steps, but just adding bit…) Open
Posted by Karthikeyan | 5 Comments
Filed under:

Attachment(s): MyAreaMenuControl.zip

SharePoint : How to programmatically download attachments from the List Items

Note: The following is example code. It is not available in SharePoint SDK SPWeb web = new SPSite(" http://karthickmain:8080/sites/test").OpenWeb (); //Open List SPList list = web.Lists["ListName"]; //Get the item SPListItem item = list.Items[1]; //Get
Posted by Karthikeyan | 2 Comments
Filed under:

SharePoint : Not getting minimize and other menu options on webparts in personal view.

PROBLEM: Not getting minimize and other menu options on webparts in personal view. RESOLUTION: Set AllowPersonalization=true in all the webpartzones in the default.aspx page of the custom portal site definitions. ROOT CAUSE: In default the value of AllowPersonalization
Posted by Karthikeyan | 1 Comments
Filed under:

Getting File not found exception when you use the SelfServiceCreateSite API to create sites based on the custom web template

PROBLEM: Getting File not found exception when you use the SelfServiceCreateSite API to create sites based on the custom web template. RESOLUTION: Copy the onet.xml file into the “..\bin\debug” folder of the application ROOT CAUSE: The custom web template
Posted by Karthikeyan | 0 Comments
Filed under:

SharePoint : Programmatically setting read-only columns erases the value in the other columns

PROBLEM : The share point list has 2 custom columns and the list has some values in the custom columns. You programmatically set the read only property of the first column to true. After that, when you edit the value of the second column through the data
Posted by Karthikeyan | 0 Comments
Filed under:
 
Page view tracker