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

  • Can you please add more details, like your current code and the error message you get to this post? Commented Mar 26, 2015 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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