jeudi 30 avril 2015

How to Enable AutoPostBack property and CheckChanged Event to an input[type=checkbox]?

I have an input[type="checkbox"] which have applied it runat="server" to access its value from code-behind. I want to make it raise postback on every checkchanged event but I can't find a property proper for that.

The reason I want to use it instead of a asp:checkbox control is because of its CSS which I found it hard to emulate its style for asp:checkbox control. This is the source of control:

<label class="switch switch-green">
               <input type="checkbox" class="switch-input" id="cbAvailabilityFlag" runat="server" >
               <span class="switch-label" data-on="Yes" data-off="No"></span><span class="switch-handle"></span>    
    </label>




Aucun commentaire:

Enregistrer un commentaire