sharepoint

Sharepoint adding an item into a Picture Library

I would like to add an item into a picture Library using c#. This is how I would add a field to a normal item: var item = list.Items.Add(); item["Title"] = "Item title"; item.Update(); How would I go about adding the picture? The picture is stored on the file system i.e. c:\myfile.png I iamgine I need to use SPFile but not sure how. ...

MOSS Publishing pages and WSS Pages

Hi Can anyone tell me why a masterpage applied to a MOSS publishing site does not get applied to any non publishing pages within the same site - very strange behaviour? ...

Elevated privileges in timer jobs

Can we use SPSecurity.RunWithElevatedPrivileges in SharePoint timer jobs? Under whose identity will the timer job run under elevated privilegs? Any gotcha's and must know facts regarding this will also be appreciated. ...

SharePoint : Guessing the attachment path before updating a list item

I have some code that inserts a list item into a list... I then have this code SPFolder folder = web.Folders["Lists"].SubFolders[list.RootFolder.Name].SubFolders["Attachments"].SubFolders[item.ID.ToString()]; foreach (SPFile file in folder.Files) { string attachmentName = t...

Registering SharePoint Event Receivers that are already registered

I am writing a web part against a list. The first thing I do in the web part is verify that my custom event receivers are registered on the list. If they are not, I register the programmatically. I have noticed that if I try to register an event that is already registered, I get no errors and no “Extra” events are registered. My ques...

Adding Web Parts to the Page Instance based on Page Layout using Feature.

I am trying to add the Web Parts to Page Instance of the Page Layout using a Feature.I know it should be through AllUsersWebPart element .I could find the reference of adding a Default Web Part to Page Layout (PortalLayouts feature does it). Also I have seen same in onet.xml . I wanted to know if it possible to create an instance of the ...

SharePoint : How to check for null with a CAML Query?

I have this CAML (lol thanks to Alex) query.Query = @"<Where><Eq><FieldRef Name='MessageID' /><Value Type='Text'></Value></Eq></Where>"; This checks if the value of MessageID = string.empty() What I would like to check for is null.... not empty string... Is this possible with CAML? ...

Weird Permissions Issue in SharePoint

My SharePoint site uses Active Directory authentication. The Site Visitors SharePoint group contains the AD group of all users. I have a subsite which Site Visitors have Read access to. Inside this subsite, I have a document library which I don't want visitors to have read access to and so I have made the permissions unique for this do...

Possible to have SearchCenter as standalone site connected to Intranet Portal?

I'm building a new Intranet Portal with SharePoint 2007 that will have News, Site Directory, and Search. Because I want to invest some serious time into customizing and tuning search, I would like to learn whether it is possible to have the Intranet Search live in its own top-level site collection? That would allow me to isolate and ba...

SPGridView - User selecting the columns

Is there a way to extend the SPGridView control in a webpart such that a user can select the columns that they want to display? Kinda like when creating/modifying a view for a list? Thanks ...

Sharepoint - where to get started with integrating to another site

...

How to insert a new line into a Sharepoint multiple line field?

I am inserting items into a Sharepoint list using C# and accessing the lists.asmx web service. One of the fields in the list is a multiple line text field (rich text), and I want to insert line breaks into the field. What characters do I put in the XML request to insert a line break? Thanks. ...

WSS Search - Content inside webparts

How would you go about having WSS search index content that's inside a webpart/pulled from an external source and presented in a SPGridView? ...

Get the content of a sharepoint folder with Excel VBA

Usually I use this piece of code to retrieve the content of a folder in VBA. But this doesn't work in the case of a sharepoint. How can I do ? Dim folder As folder Dim f As File Dim fs As New FileSystemObject Set folder = fs.GetFolder("//sharepoint.address/path/to/folder") For Each f In folder.Files 'Do something Next f EDIT (af...

Is it possible to assign webpart id in onet.xml?

I've made a page with with three zones. In onet.xml I have defined three webparts which will be added to the page upon site creation. Is it possible to assign an id to each webpart in onet.xml, or do I need to write a feature receiver which hooks up the connections? My initial thought was to use on the page itself, but then I need the ...

Is there a way to filter the RSS view of a SharePoint list?

I'm trying to get only certain items from a SharePoint list. The RSS feed is giving me everything, even if I have the list filtered of looking at a specific view. ...

Sharepoint - Cannot Create Managed Property for ows_UniqueId. It's not an option in the Mappings window.

I'm trying to run a search query using Sharepoint search, and I'm trying to grab the GUID of the items within a list (be it in the Pages, Documents, or Custom List). Many posts talk about defining a managed property tieing it to ows_UniqueId. The problem I'm having is that I do not see ows_UniqueId as an option in the mapping list wind...

SPGridView, data and correct method of ensuring data is safe

Hi, I am using an SPGridView to present some data, and have enabled the filtering ability which works very well. Until you choose a particular item in the data to filter on... The data item in question has an apostrophe in the string( e.g. "this is richards' string"), which causes the post-filter-application page load to die with the ...

Active Directory and SSO - anyone with experience on this ?

Hello, We want to implement SSO functionality in our organization, but we're not really sure what our options are, and what the benefits / disadvantages for the different solutions might be. -We have multiple old ASP(Active Server Pages) sites which should use SSO -We have multiple ASP.net web-Applications which should use SSO -We wa...

SharePoint Deployment web.config entry

I am new to sharepoint. I have to deploy an application from one server to another server (Test Server). Now I am using solution package to deploy the application. I have one problem in Deploying. In the web.config of the application there are entries like appsetting entries, safe control entries, endpoint entries for our own services an...