Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How to return TreeView from WCF Service ? Its giving error when we set return type as TreeView

share|improve this question
Can you please add more details, like your current code and the error message you get to this post? – Robert Lindgren Mar 26 at 10:00

1 Answer 1

List of valid WCF return types

  • Primitive types (string, int32, etc...)
  • Complex types with DataContract or Serializable attributes
  • Stream
  • Message
  • SyndicationFeedFormatter
  • Void

There is no return type like TreeView. maximum you can get the xml out of WCF service and bind it to TreeView control.

share|improve this answer

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.