Using a component class as a property for a custom control

C

Chris

Hi,

I'm working on a .net application where i'd like to implement the same
design-time behavior as used when working with provider/dataset/datacontrol.

I'd like to create a document component (the document) which should provide
data from different sources (ie. files, xml, databases etc.), and a custom
web-control capable of rendering the contents of the document in the
resulting html-page (the model).

I'm having problems with the designer not saving the document property of
the model control when opening/closing the page. I can set the property and
the control will render the document, but when closing and reopening the
page, the property is empty even though the html for my server control has
the property correctly set.

I've noticed that when setting the datasource property of a Datagrid, the
property value in the html for the server control is rendered like this:

<%# DataSet1 %>

Does anyone know how to accomplish this?

I've tried reading about and testing different attributes for both the
property and the document class, and I've also tried to see if having a
typeconverter for the document class would work without any luck.

Any tips?
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top