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? – Robert Lindgren Mar 26 '15 at 10:00

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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