Tag Info

Hot answers tagged

11

If you can you should use the Client Object Model (CSOM) - it does not support that many features as the web services but are superior in a number of ways such as: data types batching of commands (more efficient usage of bandwith) optimization of data loaded (more efficient usage of bandwidth) more similar to the server side object model in terms of ...


10

Ahh, now I see what you're doing. While your approach will work, I tend to prefer the "use a supported method for everyone" approach. The issue with doing this client side is that even if you remove the Silverlight container with Javascript, the browser is still initially going to try and load it. This is one of my gripes with the SharePoint team; while I ...


9

You actually calling a web service when you use client object model according to this link. Of course use web service is more direct but i dont really care about performance penalty by using Client Object Model. The more concern is productivity improvement by using client object model. But if you more comfortable using web service, you can use it.


5

Client Object Model was designed to work mainly with list data, so the API is somehow limitted. Working with web services does not always mean parsing XML data, you can use REST API (ListData.svc) that will return JSON output. Some webservices allow to switch between SOAP and JSON response format. So, my advice would be use Client Object Model when suitable ...


4

You can use Team Foundation Server for UI tests. Chris O'Brien did a presentation on this at the UK Best Practices Conference. You can have a look at his slide deck on his blog at http://www.sharepointnutsandbolts.com/2011/04/automated-sharepoint-buildsui.html He's going to be working on some more information on the subject.


4

ClientContext.Current http://blah.winsmarts.com/2009-12-ClientContextCurrent_is_null_in_Silverlight.aspx


4

I had the same problem before. The thing is that sharepoint creates the folder when you add your first attachment, not on creating the item. In other words, the folder you are trying to upload to does not exist. You can create this folder by either adding a dummy-file and removing it in an ItemAdding EventReceiver when you create the item. Another ...


4

I think using the Client-Object Model is the suitable option because as it's meant to be used with tools like Silverlight, .NET, etc. Also it provides more benefits.


3

why dont you put just the relative link in it? Then it will work in all zones, assuming that you have multiple zones. Than the {siteUrl} token is not needed. Apart from that, I believe that that token doesnt work, only works server-side(for example in masterpages, before the masterpage is rendered). If you check your web.config. If you really want to work ...


3

I don't know of anything in the Client Object Model that lets you do this directly, but if you don't want to have to deploy a custom web service, you could probably make a list with a simple workflow that sends an email, and then just have your web part put an entry in the list and make sure it contains the columns you'll need to build the email message in ...


3

If you are using the client object model you should be able to say ClientContext.Current.Web to get the current site. http://msdn.microsoft.com/en-us/library/ee538971.aspx


3

You cannot/should not use the standard SharePoint object model/API's when creating applications that does not run on the actual SharePoint servers. Here is a list of the Web Services in WSS 3.0 You need to use the web services to interact with SharePoint, or if you are using SharePoint 2010 then use the Client Object Model. Read this overview of the Client ...


3

The error appeared after I turned off Security Validation in Web Application General Settings. Turning it on again fixed the problem.


3

You're almost there, using your Files.Add method as shown you can then set properties like this: File file = docList.RootFolder.Files.Add(myFile); ListItem item = file.ListItemAllFields; item["Title"] = "Super Awesome File!"; item.Update(); References: File.ListItemAllFields Property ListItem Members


3

I solved it. For posterity: CamlQuery cqUserName = new CamlQuery(); foreach (ListItem liItem in oListInfo) { FieldUserValue fuvAuthor = (FieldUserValue)liItem["Author"]; cqUserName.ViewXml = "<View><Query><Where><Eq><FieldRef Name='ID' />" + "<Value ...


3

Client Object Model in SharePoint has basically 3 applications, nore requiring SP installed, but for which one you need certain libraries available during development: 1. ECMA Client OM - to be used by Javascript - no SharePoint whatsoever but you need the libraries (SP.js, etc.) 2. Managed - For use from Windows Forms, Console Applications, etc. - in this ...


3

When using the Silverlight Client Object Model you have two way of getting a valid ClientContext. Either you specify the url of the SharePoint site to work with in the constructor to a ClientContext like this: ClientContext clientContext = new ClientContext("http://sharepoint"); Or the <object> tag used to load your SilverLight application should ...


3

Media Web Part is a Silverlight control. So, all the formats supported by Silverlight can be played using MWP. Look at this article for details on that: Supported Media Formats, Protocols, and Log Fields.


3

The list of supported media formats for Silverlight player in SharePoint: Windows Media Video (WMV) Windows Media Audio(WMA) MP3 MP4 For more details see Supported Media Formats, Protocols, and Log Fields


2

Uploading a document can be done using a HTTP PUT command, for example using WebClient and the UploadData method.


2

I'm not a Silverlight expert, but it should be entirely possible to do what you want. The Client Object Model presents not only lists and list items, but also webs too - since these are what the navigation links are too, all the data you need can be obtained this way. Effectively you would need to use the following approach: Get a reference to the current ...


2

You should be able to resolve the user using code similar to these examples. I don't have a 2010 environment running at the moment but here's a suggestion: var clientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); var collGroup = clientContext.Web.SiteGroups; clientContext.Load(collGroup, groups => groups.Include( group ...


2

You have versioning & permissions in a document library. Plus, it's easier to load from within a SharePoint Silverlight web part when it's in a document library (you can't load it from the file system if you want to host the Silverlight app in SharePoint, unless you put it in LAYOUTS and load it in manually (probably a bad idea)). ADDITIONAL: If ...


2

Have you tried publishing it as a pdf? Then it works very similarly, all links that you have embedded work the same, the user can download it and keep it as a file on their end or view it in the browser and navigate through it.


2

The lookup field returns a value of type FieldLookupValue with two properties for retrieving the LookupID and LookupValue, but the multi-lookup field returns FieldLookupValue[] -- and array of FieldLookupValues. To do what your wanting, just iterate thru the array before binding the values. I posted a code example of getting at the values of a multi-lookup ...


2

Check this guide on how to add an application page to a Visual Studio 2010 / SharePoint project. This is only available for farm solution projects, not for Sandboxed projects so make sure you are not using Sandboxed. For full list of differences between these two click here.


2

This MSDN article should also be listed when answering this question: Deciding Which SharePoint 2010 API to Use Server-side Object Model The server-side object model provides the most extensive set of options for extending the capabilities of SharePoint 2010. It consists of every API that is documented in a class library in the SharePoint 2010 ...


2

You should configure silverlight project to move file to ../Layouts/ClientBin of your WSP Builder project, when WSP Builder creates a package it will pack it correctly. This can help you understand the approach in details with UserControls, the same will be for xap files - ...


2

The following will also work: cqUserName.ViewXml = "<View><Query><Where><Eq><FieldRef Name='Title' />" + "<Value Type='Text'>" + strUserName + "</Value></Eq></Where></Query>" + "<ViewFields><FieldRef Name='Title'/><FieldRef Name='Picture'/>" + ...



Only top voted, non community-wiki answers of a minimum length are eligible