0
votes
0answers
23 views

Can I use clean URLs with a valid SPContext.Current object?

I know I can use clean URLs with SP 2010 but my problem is the SPContext is always wrong. It sets SPContext.Current but always to the RootWeb with no ListItems or even List information. I know if my ...
1
vote
3answers
2k views

sharepoint 2010 context menu event handler

i want to hide sharepoint 2010 list/library context menu based on users. i am using below javascript $(document).ready(function(){ $('.ms-MenuUIPopupBody').live('blur', function() { ...
2
votes
1answer
529 views

Calling SP.ClientContext in a loop Javascript

I'm looping through a number of sites to run a query that checks whether new content has been added to document libraries in that site in the previous three days. However, I'm having problems. When I ...
1
vote
1answer
866 views

Get SPWeb from SPContext in WCF hosted on SharePoint

I have created and deployed a WCF service in SharePoint and I am sending requests using JQuery. Every thing is working fine except for sub sites. Lets say I have these two service URLs: - ...
0
votes
1answer
231 views

Grab list of site collections from SPFarm object

I have a Farm level feature that returns null when I try to access SPContect.Current.Site. Is another way to grab a list of site collections? I have access to SPFarm.Local
1
vote
2answers
640 views

SPContext.Current is sometimes null in code behind of InfoPath

On occasion I find that SPContext.Current returns null in the code behind of my InfoPath forms. This is occuring while I have the form open in a SharePoint 2010 site collection. I can't figure why ...
0
votes
0answers
25 views

SPContext is null on Feature Activation [duplicate]

Possible Duplicate: Error : Object reference not set to an instance of an object on feature deployment I am writing a feature receiver. Here is my code sample on feature_activated code. ...
23
votes
1answer
13k views

Using SPContext.Current or using static URL

There are multiple ways to work in the SP object model. The starting point for instantiating objects looks different when you look at different developers. Many times I see people doing this: SPList ...