Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi All,

I have a Radio Button with name as "Active". If Active is checked i want to store value "1" in database, if unchecked i want to store "0" in database.

Can anyone help

Meenakshi
Posted
Comments
Mario Majčica 10-Sep-12 5:50am    
What did you tried till now?
[no name] 10-Sep-12 7:46am    
Okay... if that is what you want to do, you have my permission.
Mehul M Thakkar 10-Sep-12 8:01am    
So where is the problem? do some googling.

1 solution

You can try this .Check Enabled Property of Radio Button and Check value .

VB
Dim Active As Boolean
       Active = rdActive.Enabled
       Dim tpActive As Integer
       If (Active) Then
           tpActive = 1
       Else
           tpActive = 0
       End If


Use this tpActive in Insert Query
 
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