Spcontext.current.listitem is null for a published page




















Office Office Exchange Server. Not an IT pro? Resources for IT Professionals. Sign in. United States English. Ask a question. Quick access.

Search related threads. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Current is null Ask Question. Asked 7 years, 2 months ago. Active 7 years, 2 months ago. Viewed times. Improve this question. Amal Hashim In my web service i use the function. Anyway - you cannot use "SPContext. Ishai Sagi. Just read my article about common coding samples for sharepoint and see how to get a list object using code, without "running in context".

Common and simple coding tasks in sharepoint. Can you give me an explain, if it's possible, that i can't use this method and where can i use it. Can somebody please tell how do we determine whether the web application i am working with is in SharePoint Context or not. Does it need to be in specific directory for that? Current will only work when your code is running within a sharepoint site. If you have trouble with that, just see the article I wrote link in my answer above about how to get to sharepoint objects.

Dev Center. Explore Why Office? Android ASP. Ask a question. Quick access. Search related threads. Remove From My Forums. I've got a document set welcome page customized with custom user controls and a document set contents web part. The user control gets its context by the SPContext. The problem starts when I have more than 30 documents in my document set contents web part and I click "Next" to see the next page of the paged documents.

In our staging environment SPContext. ListItem is null immediately, on our dev machines it is only null when I manually click the navigation bar and ask the page to refresh. ListItem works.

Hi SabbeRubbish,. I can reproduce your issue, use SPContext. ListItem to get the list item information in the document set welcome page, it is only working when enter the set welcome page, and will be null when enter the next page of the set items.



0コメント

  • 1000 / 1000