1
vote
1answer
34 views

SharePoint Designer Workflows read .XOML file programmically using c#

I need to get list of all the workflows using a custom activity. I visited a workflow using designer and have the name of the activity. I just need to read that xoml file and see whether that file ...
2
votes
1answer
99 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
101 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
30 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
28 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
336 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
314 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 ...
2
votes
1answer
29 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
125 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
67 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
46 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
256 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) { ...
2
votes
1answer
62 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
137 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 ...
6
votes
2answers
506 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
107 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 ...
1
vote
1answer
85 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
1answer
67 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
29 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
116 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
158 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
238 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
156 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
154 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
54 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
407 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
184 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
76 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
53 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
51 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
45 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
88 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
58 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
307 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
502 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
200 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
162 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
2k 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
542 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
93 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
106 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
4k 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
49 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
430 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 ...
2
votes
2answers
384 views

Item Updated through different forms runs Item Updated event receiver

Simple but mind blowing question it is. Basically I am updating a specific list items through two different ways, one is using ASP.NET web forms and one is using default list forms provided by ...
5
votes
2answers
271 views

Why we need to do IIS Reset after adding a template

I added a template using, STSADM -o addtemplate -filename "C:\Stalker\BaleeeBaleee.stp" -title "YouBreakLive" I can see it in Central Administration in "Custom" site templates when I try to create ...
0
votes
1answer
140 views

STSADM or C# script to delete all custom site templates

I want to delete Custom site templates off my farm and wondering if someone know any script I can use. Not a big fan of Powershell at the moment as I am using SharePoint 2007.
1
vote
0answers
51 views

Central Admin gives Server error 500 [duplicate]

I tried to update my server SharePoint 2007 to service pack, when I run Office x86 service pack 2 exe on my virtual pc, it made my CA stopped working, I am pretty sure I used right exe file, however ...