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.
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.