Click here to Skip to main content
16,020,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in my page there is one checkbox And I want to insert checkbox value save in database??

What I have tried:

_dConfiguration.Bonded = Convert.ToBoolean(checkBonded.Value);
Posted
Updated 26-Jun-16 20:43pm
Comments
Kiran Vaidyanathan 27-Jun-16 8:34am    
What exactly are you trying to save in database? Suppose if the checkbox is checked, what value must be entered into the database?

1 solution

use Checked [^]Property

it is already a boolean so no need of casting.
C#
_dConfiguration.Bonded = checkBonded.Checked;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900