4,124 reputation
2923
bio website
location Norway
age 27
visits member for 4 years, 8 months
seen 2 days ago

Feb
21
comment Library event receiver - Object reference not set to an instance of an object
If web was null in OPs code, wouldn't this code have the same problem when calling web.Site?
Feb
21
comment Auto populating a text box based on listbox selected value and drop down value javascript sharepoint
I don't think comment is a good place to dump code, please use a pastebin such as gist.github.com . I can't derive anything from your dump either, only more proof that you have a select element, and as long as each option has value my code should work. You could extract the exact HTML and append it to the fiddle
Feb
21
comment Auto populating a text box based on listbox selected value and drop down value javascript sharepoint
By list box I would suspect <select><option></option></select>, like jsfiddle.net/HZ3fB
Feb
20
comment powershell to export list in sharepoint 2010
Great. Have my upvote :) (I usually don't care, but perhaps $web.Dispose()?)
Feb
20
comment powershell to export list in sharepoint 2010
I haven't tried your code, but is false something in PowerShell? I would expect $false
Feb
19
comment SQL Injections with SharePoint 2010 CAML Queries
Ok, I probably just misunderstood, since that is the only way I know how to add new/update using CAML.
Feb
17
comment SharePoint 2013 - disposing SP.ClientContext in JavaScript
Have you seen sharepoint.stackexchange.com/a/62902/627 ? This question might be a duplicate, as I believe it should be the same for 2013.
Feb
17
comment SharePoint 2013 - disposing SP.ClientContext in JavaScript
You had to dispose the JavaScript object in 2010? Are you sure? Got any link to that? However Microsoft.SharePoint.Client.ClientRuntimeContext extends IDisposable and you should dispose this, but only in C#, I imagine this will dispose off some TCP clients
Feb
17
comment SQL Injections with SharePoint 2010 CAML Queries
Not really related, just curious, are you really using <Batch> to add new/update list data?
Feb
16
comment How to Find Lookup field list using Programmatically
Maybe, who knows :) I'll give you a vote though, until further specified this is IMHO the correct answer.
Feb
16
comment How to Find Lookup field list using Programmatically
I have a slight feeling OP is looking for a way to find lists with lookup to a particular field, and if so it is much more complicated. In that case one might have to do a recursive search, very resource intensive. But I can only speculate because of the question vagueness
Feb
15
comment DefaultValue on WebPart Custom Properties
Your current approach is fine, your only problem is that you call .Trim() on a variable which can be null, you can solve this by (titleWP ?? "").Trim(). And this is initially, when users save the variable will have a value. I'm a bit baffled by your unconventional naming (underscore for property, none for private variable), but it should work.
Feb
15
comment DefaultValue on WebPart Custom Properties
Hoping for SharePoint 2013? :)
Feb
15
comment DefaultValue on WebPart Custom Properties
I'm not sure what you want though, here if titleWP is null it will be Résultats de recherche, if titleWP is empty it will be search result. This seems strange to me, but it is according with your original code.
Feb
15
comment How to access another web, by name in client object model
Basically; 2010: SPServices, 2013: CSOM/REST
Feb
15
comment How to access another web, by name in client object model
What version of SharePoint? If this is 2013 then REST is a good suggestion, although with 2013 you can use ClientContext cross-SPSite anyway, and I can provide an example, but if this is 2010 it might be more difficult
Feb
15
comment Loading jQuery and jQuery UI within JSLink script
Why not use sharepoint.stackexchange.com/a/58636/627 (LoadSodByKey), or ` SP.SOD.registerSod('jQuery', 'code.jquery.com/jquery.min.js'); SP.SOD.executeFunc('jQuery', null, function () { console.log(jQuery); });` ?
Feb
12
comment Wrap or add rows to promoted links
I have tried this on a couple of pages now, and it always works for me. But instead, try to do what teylyn suggested: Create a CSS file, but the CSS inside that, and reference to that file from a Content Editor Web Part. Something like promotedlinks.css with content: .ms-promlink-body { width: 480px; }
Feb
11
comment Wrap or add rows to promoted links
The whole tag, <style> .ms-promlink-body { width: 480px; } </style>
Feb
11
comment Wrap or add rows to promoted links
This works for me: Edit page > Insert > Web Part > Media and Content > Content Editor > Add > Click "Click here to add new content" > Edit Source > Paste the style-tag > OK > Save. When you click Edit source it should be blank, if you don't see the "Click here to add new content" try Edit Web Part first.