Quantcast
Channel: CodeProject Latest postings for ASP.NET
Viewing all articles
Browse latest Browse all 3938

How do I insert a toggle switch value into sql database

$
0
0
I have a couple of toggle switches: one with Yes/No option and the other with Delivery/Purchase option. I know that you can use the ControlName.Checked but that just inserts True or False. How do I do this when these are the options.

Here are my toggle switch code for Purchase/Delivery:

<labelclass="switch"><inputclass="switch-input"type="checkbox"id="orderselection"name="orderselection"runat="server"/><spanclass="switch-label"data-on="Purchase"data-off="Delivery"></span><spanclass="switch-handle"></span></label>

and Yes/No:

<labelfor="exampleOrderNumber">Are Redelegations Authorized?<labelfor="exampleInputCity">:</label><labelclass="switch"><inputclass="switch-input"type="checkbox"id="authredelegation"name="authredelegation"runat="server"/><spanclass="switch-label"data-on="yes"data-off="no"></span><spanclass="switch-handle"></span></label>

Viewing all articles
Browse latest Browse all 3938

Trending Articles