How to declare a property pointing to a component

I

Ingvar Nilsen

The DataGrid has a property DataSource.
When assigning a DataSet to this property, the VS.Net IDE inserts the
following code:
DataSource="<%# dataSet1 %>"

This is fine.

Now, I have a custom webcontrol, FooControl, with a property
FooDataSource.
How do I declare this property (in C#) so that the VS.Net IDE inserts:
FooDataSource="<%# dataSet1 %>"
when a DataSet is assigned to this property?

All I get is:
FooDataSource="dataSet1"
and that doesn't work..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top