I’m creating a custom server control in ASP.NET WebForms and want to have a hyphen in my property name the same way the ASP.NET server controls do in the markup. For example, a Label control has a “Font-Size” property in the markup like so:
<asp:Label ID="Label1" Font-Size="small" Text="hi" runat="server" />
How do I accomplish this?
Just use complex properties on your control:
and then: