I have a medium sized project with a lot of pages. One of the things that I've noticed is that we have a lot of labels that have AssociatedControlID pointing to controls that are not visible. The target controls are set visible when a user has edit permissions, but not normally.
This means that the html generated in not valid, which we'd like to get as close to as possible.
I attempted to implement a new label, which overrides the existing label control and render the for
attribute only when needed. This proved painful as much of the functionality required was set to internal in the Label
class.
Is there a better way?