2
votes
1answer
55 views

Add file without checking in

I have a question. How can I add a file without checking it in directly? I add file like this: Library.RootFolder.Files.Add(fileName, buffer, overwrite); But when I do that I suppose the file is ...
0
votes
1answer
69 views

SharePoint adds +1 to time when I set it

I have an issue with SharePoint date time field. Basically I have a date time field, and this field contains for example 19/12/2014 11:30:00. I would like to get this date and remove the time part, ...
1
vote
1answer
28 views

Site collection not created programmatically only in LIVE Server

I am using SharePoint 2007 and was not able to create site collection and add sites pro grammatically using c# code. Some times it creates the site collection and some times it doesn't. works fine ...
0
votes
1answer
27 views

Deploying webpart on a single server

How can I deploy web part on a single server ? I have 5 front end servers in my farm and I have a solution file but i want to deploy web part to only 1 server I know i can add it using STSADM then ...
0
votes
2answers
234 views

Generating the Word Document with SharePoint list data

I have an issue with exporting the list data from sharepoint to microsoft word (docx). Basically, the export succeeds, I can move the data from the list to the word document using xml (XElement etc) ...
0
votes
3answers
158 views

spsite exist or not

How can i check if spsite exist or not ? I have a web address www.portal2010.com/internalportal/employeesites Now when i try to open web and spsite it opens upper level spsite instead spsite mysite ...
0
votes
0answers
78 views

How to get SPFieldUserValue using ADUser

I have a people picker field that I need to fill in using a console application, now I have UserName and I can get ADUser object with it, how can I get SPFieldUserValue out of it ? Since user isn't ...
0
votes
0answers
41 views

ItemAdded file upload to another ASP.NET application

When a item is added, i got to upload this item added to document library to a asp.net site, now i have done alll authentications just need to upload file, code i am using is only uploading files upto ...
2
votes
1answer
26 views

Best way to upload document to a cross domain

what will best way for me to upload a document to a different site collection in a different domain (also a different farm) using some credentails. Should i use List.asmx web services or Should i ...
4
votes
1answer
109 views

Memory Leak is it?

I have this small chunk of code and I can't understand why it's taking soo memory. static void Main(string[] args) { using (SPSite mySite = new ...
1
vote
1answer
48 views

How to add field programmatically to list (without adding it to CT)

I'm adding here a field to the list, but it adds itself to a default content type, how can I add it to library but not to CT? SPFieldBoolean flagField = ...
0
votes
1answer
40 views

Will the code be leaking

I've wrote here a code for SharePoint 2007 to modify few items through out of all site collections in web app, my question is the code written good, or is there a leak somewhere, and i could improve ...
1
vote
1answer
168 views

Looping through all the document libraries and modify the items

I have here a piece of code which loops through the all site collections and webs and lists to find particular and modify some items: foreach (SPSite site in webApp.Sites) { ...
0
votes
0answers
40 views

Top Navigation Bar listing in SharePoint 2007

I've been trying to figure out how to get a list of the top level sites that are in my Top Navigiation Bar. I want to get the Title and Url for "Subsite Number One, Subsite Number Two, etc.." and ...
2
votes
1answer
44 views

Error on updating a document item

I have an issue with updating an item in ItemUpdated event. Basically on ItemUpdated, I would like to reupdate that item by setting some properties, because it is a docx I have to do it in ...
1
vote
3answers
92 views

Can I programatically move sites or content between 2007 and 2010?

Using the SharePoint Object Model on a SharePoint 2007 environment and the remote object model to talk to a SharePoint 2010 environment would it theoretically be possible to migrate sites or content ...
5
votes
2answers
395 views

Picture Library Image size event receiver

I created a event receiver but work ok for single file but no work for multiple files, HttpFileCollection collection = _context.Request.Files; for (int i = 0; i < collection.Count; ...
0
votes
0answers
82 views

SharePoint Site Content Types and Site Columns Galleries are empty

I provisioned a SharePoint (2007) site collection using C# SharePoint API. Pretty standard stuff. Subsequently, I added a couple of site columns, document libraries, etc. and then a child website ...
0
votes
0answers
412 views

SPWeb.GetFolder() returns SPFolder with no files or sub folders

I'm encountering a strange problem on SharePoint 2007 where the following script correctly enumerates files and folders on my QA and DEV sites, but not on my Production site. Why is SPWeb.GetFolder() ...
1
vote
1answer
60 views

Loading a UserControl within another UserControl code

Can someone tell me how I can load a user control from within another user control. I'm using MOSS 2007
0
votes
0answers
53 views

Upload the document to sharepoint document library through asp.net portal

We have web portal on sharepoint 2007. I want to upload document in sharepoint document library from asp.net portal. I am thinking of creating web service for this but I don't know the basics of ...
0
votes
1answer
61 views

textbox visual control how to get text

i have a user control, which has update panel and a button in it, when i click on button a message box appears, in messagebox i have one text box and another button, when i click on another button, ...
1
vote
1answer
27 views

no getting user control property from webpart

I am using this MSDN tutorial but it is not working, http://msdn.microsoft.com/en-us/library/ff649867.aspx When I try to get a usercontrol value, nothing comes up try { // Loads a user control ...
0
votes
3answers
95 views

User control propertie get from webpart

I have a webpart that is loading a user control, but I am not able to get the value of a webpart property in the loaded user control. The web part code goes like this: public class CVWebPart: ...
2
votes
2answers
122 views

How to get all web controls on a sharepoint page

I need to get all web controls on a SharePoint page but not sure, using (SPSite bigSite = new SPSite("http://bigPortal.bbbb.com/bb/bbWeb")) using (SPWeb bigWeb = bigSite.OpenWeb()) ...
1
vote
1answer
24 views

Clone Existing SP2007 Site to New Environment For Testing and Staging

I am currently working on a large SP2007 site for a client. This site was initially built from a VS solution and some of the components of the solution can still be deployed to production if code ...
-1
votes
1answer
180 views

String to Decimal Conversion in C# (Sharepoint) [closed]

Converting string to decimal seems to be a familiar question. But in my case the an error is throwing while I tried to convert a string value "10.00000000000" to decimal. I tried following codes ...
0
votes
2answers
116 views

Custom action with javascript doesn't navigate in DisplayForm

I have a strange issue, basically, I have the following custom action: <CustomAction Id="Navigate.DisplayMenu" Title="Navigate to:" RegistrationType="ContentType" ...
1
vote
1answer
117 views

Getting CultureInfo from Web.Language

I can get language code, e.g. "1033" for en-US by, using (SPSite site = new SPSite("https://portal.loonetoones.com/default.aspx")) using (SPWeb web = site.OpenWeb()) { ...
0
votes
2answers
47 views

Custom action with custom code doesn't work properly

I have an action in my document library, but it doesn't work as it supposed. So I have here definition of my custom action: <CustomAction Id="MyProject.Google" Title="Go to google" ...
3
votes
4answers
331 views

SharePoint List / Library property bag

I'm working with sharepoint 2007 and i have a question, does a sharepoint library / list has something like property bag, where i could store some properties for the list? Like a SPWeb object. Or ...
0
votes
1answer
145 views

SPLongOperation break on error and stay on same page

I have a question regarding SPLongOperation. Basically i'm using it while some actions are happening, and if everything goes well it should redirect user to an other page, but if something goes wrong ...
0
votes
1answer
66 views

How to show what level of permission a group or user has to a site?

In SharePoint 2007 when you go to a site and view advanced permissions (Site Actions - Site Settings - Modify All Site Settings - Advanced Permissions) you are presented with a page that has a table ...
0
votes
2answers
50 views

Capture SharePoint role group and group members?

For our audit process I need to regularly capture all of our SharePoint role groups (for our main site collection) and the members in each group. Is there a reliable way to approach this problem?
0
votes
1answer
42 views

SP2007 using Source token in link

In SharePoint 2007 in some occasions i see that when im redirected to some pages etc, i see a source in query string, and this i can use to be redirected back to the original page. I've read on msdn ...
0
votes
1answer
44 views

Link to document library

I have a small issue, basically i have an instance of document library / list, now, how can i get a link to that list / document library? I'm working with sp 2007 To clarify, here is the code: ...
0
votes
3answers
76 views

On ItemUpdating modify property

I have an issue, with this event. What my purpose is: i want to update one of the properties based on few criterias, so i want do fill a field A if field A is empty and the field B is not empty and ...
2
votes
2answers
57 views

On AddingItem event in Document Library distinguish is it a document or a folder

enter code hereI have a small issue, I cannot seems to find a way to find out what time of item is being added, so i have a method AddingItem and here i need to know is this item a FOLDER or just some ...
1
vote
2answers
210 views

LinkButton with click method doesn't work

I have an issue with LinkButton in my toolbar, basically i deployed a custom action which adds a link button to the menu, this link button on click should do some task like adding an item, but this ...
0
votes
1answer
333 views

Fill the fields in new form for an item

I've came across a requirement where I need to fill some of the fields in newform. So basically we start from view item, where we can see an existing item in a list, then we click something like move ...
0
votes
2answers
163 views

Custom action doesn't appear

I have an issue with custom action in SharePoint 2007, basically i have the following custom action declaration: <Elements Id="CF60B88A-783A-44f8-A49D-43659AB51G7E" ...
4
votes
2answers
133 views

ListItem[“Property Name”] VS ListItem.Properties[“Property Name”]

When we try to get list item properties, three ways of getting property I remember are, ListItem["Property Name"] //always work fine ListItem.Properties["Property Name"] // works fine unless I ...
0
votes
2answers
1k views

Sharepoint 2007 Powershell: $item.update() gives error that file has been modified

I am trying to programmatically update some metadata for a sharepoint item using powershell. Here is my code: $web = getWebByURL("http://test-site/spadmin/") $itm = $web.lists["Documents"].items[0] ...
2
votes
1answer
373 views

Why Item Updated and Item Added trigger together when we add a item to list (document library)

I have gone through hundred of articles over months but never understood as what could be the reason Item Updated and Item Added trigger together when we upload a item, even though if you try ...
0
votes
2answers
89 views

Sorting out lookup values while getting them

I have two lists, List A [Document Number, Name, Title,...] (document library) List B [Information Number, Name, Title, Document Number] (simple list) Now List B is getting all documents from List ...
0
votes
1answer
30 views

Checking if a list is consuming lookup value column or not

I have two lists, List A [Document Number, Name, Title,...] (document library) List B [Information Number, Name, Title, Document Number] (simple list) Now List B is getting all documents from List ...
1
vote
1answer
98 views

Multiple files upload to document library simultaneously & Custom property

I have a custom SharePoint 2007 document library which has a custom boolean column "Is it Important". It works perfectly for all documents if I upload documents one by one regardless of if its a word ...
0
votes
1answer
3k views

Feature activation error: System.InvalidOperationException: Operation is not valid due to the current state of the object

i have taken one List Email event receiver(Type is EmailReceived) and that event receiver attach with document library. when i am activate that feature got error. i have check on ULS Viewer. error ...
1
vote
1answer
44 views

Reupload the document (update)

I'm writing now code agains the document library, that code adds files to the document library. Basically what I want to do is, when the particular file already exists in the document library with the ...
2
votes
2answers
271 views

Updating a document library list ltem in ASP.NET code behind file

I am trying to update a list item's custom property in asp.net code behind file but getting Error 500 without any explanation or further error, while debugging I realized it happens while calling ...