[Mono-list] System.Web.UI.INamingContainer
Gaurav Vaish
gvaish@iitk.ac.in
Tue, 6 Nov 2001 14:09:47 +0530
Thanks.
It clarifies quite a few of my other doubts which I had.
and yeah - quite a few of WebControls.* class need it / use it.
Cheers,
Gaurav Vaish
----------------------------
----- Original Message -----
From: "Nick Drochak" <ndrochak@gol.com>
To: "Mono-List" <mono-list@ximian.com>
Cc: "Gaurav Vaish" <gvaish@iitk.ac.in>
Sent: Tuesday, November 06, 2001 13:46
Subject: RE: [Mono-list] System.Web.UI.INamingContainer
> | I was wondering what good is this interface for?
> | It does not have any member / method to be implemented!
> |
> | The documentation reads:
> | Identifies a container control that creates a new ID
> | namespace within a
> | Page object's control hierarchy. This is a marker interface only.
> |
> | What do you mean by a "marker interface only"? Unable to make
> | any sense
> | out of it.
> |
>
> >From the docs on Composite Control:
> "INamingContainer is a marker interface that has no methods. When a
control
> implements INamingContainer, the ASP.NET page framework creates a new
naming
> scope under that control, thus ensuring that the child controls have
unique
> names in the hierarchical tree of controls. However, you should not
> implement this interface unless your control needs it, because there is an
> overhead in creating a new naming scope."
>
> So, ASP.NET looks for it and does some special work if it's there.
"Marker"
> in this case means you "mark" your class as needing special treatment by
> ASP.NET. You only need it to have this interface in your class if (again
> according to the docs):
> -If the control provides databinding.
> -If the control is a templated control.
> -If the control needs to route events to its child controls
>
> HTH,
> Nick D.
>
>
> _______________________________________________
> Mono-list maillist - Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list