Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I read a component's WebDavUrl via PageData using the Core Service its returning "null"?

var page = (PageData)client.Read("tcm:71-122971-64", new ReadOptions());                

Is there a different way to get to the WebDavUrl?

share|improve this question

WebDavUrls of linked items are not read unless you are reading it with correct LoadFlags, like:

var page = (PageData)client.Read("tcm:71-122971-64", new ReadOptions{LoadFlags = LoadFlags.WebDavUrls});  
share|improve this answer
Just spotted that when you answered! Gotta wait 10 minutes before I can accept though! – Neil Apr 28 '14 at 9:11
Intrigued - what's wrong with the use of "as" when casting then Dominic? – Neil Apr 28 '14 at 13:26
To me, a cast is always preferred over using the as keyword, since the latter will not throw an exception when the cast is invalid. But if you will always check if your object returned is not null, then you can just as well use the as keyword. – Bart Koopman Apr 28 '14 at 13:32
I see Bart and David have already provided good input. For the full discussion - rants and all... see :-) – Dominic Cronin Apr 29 '14 at 7:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.