Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my webpage i have one Checkbox(status).if checbox is checked status is 1.this 1 will be stored in Db and if checkbox is not checked status will be 0
Posted
Comments
DamithSL 19-Nov-14 3:53am    
what you have tried? can you update the question with your code?
OriginalGriff 19-Nov-14 4:01am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.

First u have to create a DB table and named the column name as Staus..
then write this on code behind,

if (Checkbox(status).Checked == true)
User.Status = 1;
else
User.Status = 0;

here User is the the object of the class for setting the Property to insert the value in to database
 
Share this answer
 
int status =0;
if (Checkbox.Checked == true)
Status = 1;
else
Status = 0;

u can store this value into database
 
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