Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Tuesday, February 5, 2008

Web Control IDs INamingContainer to avoid duplicate IDs

The ID property of the WebUserControl for controls that may be used mulitiple times in an aspx page should not be repeated. Simple implment the INamingContainer to prevent duplicate IDs as follows:

public partial class UCRepeater : System.Web.UI.UserControl, INamingContainer
Marker Interface - An interface that does not require explicit implementation.

No comments: