sharepoint

SharePoint 2007: How can I perform a series of operations within a transaction?

I would love to know how to perform a series of operations in a SharePoint context within a transaction. For example, I would like to be able to do something like the following: context.BeginTransaction(); listItemA.Update(); listItemB.Update(); context.CommitTransaction(); I know this isn't possible with the OOTB APIs, but someone h...

ASP.net page without a code behind

I have an ASP.Net page with a C# code behind. However, I've been asked to not use a code behind - so that it will be easier to deploy in SharePoint. Is there a way to include the C# code in the ASP.Net page, without using a separate code behind file? ...

A declarative workflow does not start automatically after you install Windows SharePoint Services 3.0 Service Pack 1

That's the title of kb947284 actually. Recently I was involved in a Sharepoint project. I run into this problem where my workflow does not start automatically. If I run the workflow manually, it's just fine. I found kb947284. Apparently the cause of this problem is the installation of WSS 3 SP1. I did what it said in the Resolution secti...

How to make an ASP.Net page with a C# code behind that will work in Sharepoint

I need to develop a page for Sharepoint. Basically it is a 3 step process that takes some inputs, gets some data and shows a preview of it, then allows the data to be sent off attached to an email. I know ASP.Net and C#.Net, and the problem should be reasonably easy to solve with an ASP.Net page and a C# code behind. However I've neve...

How do I programmatically retrieve previous versions of master pages from a SharePoint site?

In a SharePoint site, as you checkout/modify/checkin a master page, previous versions of the master page are retained in SharePoint and you can see a list of previous versions in the master page gallery. It seems to me that the only way to view the contents of a previous version, is to do a restore of that version - this however will cre...

Creating a sub site in SharePoint takes a very long time

Hi, I am working in a MOSS 2007 project and have customized many parts of it. There is a problem in the production server where it takes a very long time (more than 15 minutes, sometimes fails due to timeouts) to create a sub site (even with the built-in site templates). While in the development server, it only takes 1 to 2 minutes. Bo...

Modifying the webparts on a users mysite

I need the ability, as an administrator, to go to a users My Site and change the webparts they have. I can seem to find a way in the UI or find anything from Google. Ideas? ...

Create Multiple 'Posts' lists in one SharePoint Web.

Hi, Is it poosible to create multiple SharePoint lists in a single SharePoint web. We do not want to create seaparate sub-webs for each blog site. Any pointers on how to achieve this would be very helpful. Kind regards, ...

XPath Node element indexing based on attribute

I am trying to build an Infopath form which populates fields with data back from a Sharepoint list. I set up a drop-down list box who's values get populated from a Sharepoint data source. That part works fine. Now I want other string fields to get automatically populated once the user selects one of the items from the list. So I set up ...

SharePoint - find the sitetemplate value of a WSP template?

I'm trying to script the creation of sites for the fab 40 Microsoft SharePoint templates. I'm having trouble finding the value for the sitetemplate parameter for the stsadm command to create the sites. e.g.: stsadm -o createsite -url http://Test/sites/Team_Site **-sitetemplate STS#0** -title "Team Site" ... Is there a command I can ...

Methods of running with Elevated Privilges in a MOSS Publishing Site

I am wondering why the two methods listed below do not give the same security trimming. Expected result: Both methods give full access to all content in the current site collection Actual result: Security trimming is occuring when using Method #1 Method #2 works properly for retrieving content from other webs, but Method #1 does no...

Intermittent Problems loading type

I have a SharePoint site that I have added a few extra pages to in order to handle some custom AJAX requests. Every now and then, about once a week, I get a call saying it's not working. When I look into it, the error I'm receiving is: Could not load type 'My_Controls.Control_Name' . Where My_Controls.Control_Name is the name of the...

SharePoint Content Database Showing Old Content...

So, I copied a content database from our production server to our test server. Then went into Central Admin on the test server and removed the existing content database. I then went to the database server and restored the newly copied production backup of the content database. Finally, I ran stsadm to reassociate the content database bac...

SharePoint and workflows

With MOSS 2007 (the question is probably applicable to WSS as well but I'm working in MOSS at the moment) is it possible to have the same Workflow on every Pages list within the site collection? We're deploying a site with a basic 2-stage approver workflow so I'm not developing a custom one, just using the existing Approver workflow but...

SharePoint 2007 Site Template Content Types

I am new to SharePoint development. We have created a base site template and have used that template to start new sites in other locations on the same server. This works fine but the newly created site seems to "flatten" the custom content types created in the original site. I would think there would be a way to keep the original cont...

Event Receiver for Document Library

I'm trying to update one of the properties of a word document from an event receiver. I'm handling it with the ItemAdded event and updating the property as is: // Modify property DisableEventFiring(); properties.ListItem.File.CheckOut(); properties.AfterProperties[HelloWorldInternalFieldName] = "Hello World!"; properties.ListItem.Updat...

Packaging multiple features into a single WSP solution file

I am working on a sharepoint feature which includes a couple of list definitions, 2 webparts, a feature receiver assembly and an InfoPath form. I have to use WSPBuilder to package these, and the requirement is to package all these features into a single WSP solution file. Now, WSP builder requires the deployment files in a particular ...

Sharepoint DB Server Rename

Hi Guys i have one application server and one DB server i have installed MOSS on App server and its content DB is on the DB server. due to policy reasons i had to rename the Sharepoint database server now the problem is MOSS is not working. So how do i make it work thier is stsadm command renameserver but that is to change the host ...

SharePoint Development Permissions

Hi I am using the SharePoint namespace to pull items from various lists throughout the site. My web part works, but only on my account. When I try it on another account it gives me "Error: Access Denied" for the page. I have taken all web parts out and have only this web part on the page. When I remove the following lines the page lo...

Good beginning CAML tutorials?

Hi there, right now I'm trying to get CAML down pat in SharePoint, where is the best place to start for this? The MSDN content doesn't impress me much as being somewhat cryptic, though the Wikipedia entry was rather good for starting out. Thoughts? Thanks! EDIT: Everyone below has great links, but alas I can only pick one answer... ...