I have a single checkbox...however I want to store the value of the checkbox into the database instead of having it show on the page....
what would i change cbpb2.text to?
If cbpb2.Checked = True Then
cbpb2.Text = "Y"
Else
cbpb2.Text = "N"
End If
By value do you mean the state or the label of the CheckBox?
state
You can use a bit field and then you write 1 to it if the CheckBox is checked, otherwise 0/null. So when you check the CheckBox and it's "checked" Update this column to 1 otherwise 0.
沒有留言:
張貼留言