Wednesday 24 September 2008

How to make objects available as datasources for databound controls

This attribute goes to the class:


   1:  // makes objects of this class suitable for binding to controls
   2:  [System.ComponentModel.DataObject] 

And this goes to the method:


   1:  // this attribute is so that the method will show up in the 
   2:  // ObjectDataSource wizard
   3:  [System.ComponentModel.DataObjectMethodAttribute(
   4:  System.ComponentModel.DataObjectMethodType.Select, true)]

No comments: