Reach components from designer in ASP.NET 2.0

V

Vincent Scheel

For a while I have been searching for a way to reach the components via
the designer host. Via the designer host's Container, it is possible to
reach the controls, but it is not possible to reach components (such as
a SqlConnection object). This was possible in ASP.NET 1.1.

In the following code, it is possible to reach controls (such as a
SqlDataSource) but it is not possible to reach a component.

Container cont =
(Container)Component.Site.GetService(typeof(IContainer));
if (cont != null)
{
object o = cont.Components[_objectToUse];
// Do something with the object...

Does anyone know if it is possible to reach these components during
design-time and how to do that?

Thank you very much in Advance.
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top