Reputation: 3364
Hii,
I m working in Asp.net 2.0 with C#.... I have a custom control and i have to use 'Datasource' property which is exactly like a repeater having. Any idea regarding this pls help me.
Upvotes: 0
Views: 502
Reputation: 5276
Any public property with a setter will be exposed in the markup:
public class MyControl : UserControl
{
public object DataSource {get; set;}
}
This will allow you to set the DataSource property either through the HTML or in code.
Is that what you meant?
Upvotes: 1