• 0

[c#] Checkboxes and Radio Buttons with SQL Server


Question

Good evening,

I have a small application which stores information within a remote sql server. I've now come to store the checked state of radio buttons and checkboxes but having a little difficulty.

Can anyone shed any light on the checkboxes and also, if i have a group of radio buttons within a groupbox how do i determine which of the 3 radio buttons has been chosen?

Hope this makes sense.

Thanks,

Michael

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

the checked property of a check box is of type bool, SQL Server dosent have a bool type but you can just use a bit field and it works just the same.

For radio buttons use the selected property to determine which one has been picked then just use a byte field and assign each radio button a number, so if they have selected the 2nd one store 2, etc.

Link to comment
Share on other sites

  • 0

Each radiobutton should be named and you can determine which one is checked using its name and the selected property. It doesn't make a difference if they're inside a groupbox.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.