ZekeLA
asked on
Set ASP.NET set checkbox InputAttributes class in markup?
I just learned that <asp:checkbox CssClass="xyz"> puts the class tag in a span surrounding the rendered checkbox input element. I can add the class to the input element using server side code such as:
MyCheckbox.InputAttributes ("class") = "xyz"
Is it possible to do this somehow directly from the aspx markup?
Thanks in advance.
MyCheckbox.InputAttributes
Is it possible to do this somehow directly from the aspx markup?
Thanks in advance.
ASKER
class is not a valid attribute of asp:checkbox
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm using the class for jquery statements so it pretty much has to be on the element itself. Thanks anyway. Knowing it can't be done is a sufficient answer.
<asp:checkbox Class="xyz">