Reputation: 52952
I want the programmer to pass a Control to a method, and then I want to add an onclick to it. But control doesn't have an Attributes property. Is there an interface or something deriving from Control that I can use, to add an onclick attribute to it?
Note that I want to add a javascript onclick (clientclick?).
Upvotes: 1
Views: 186
Reputation: 10834
Check out the System.Web.UI.WebControls.WebControl
class - it inherits from System.Web.UI.Control
and has an Attributes
property.
Upvotes: 4
Reputation: 52952
D'oh I fixed it now, the solution is to use a WebControl rather than a Control.
Upvotes: 1