Hi,
Stuck on a project here. ASP.NET / VB / SQL. Trying to get a VB.NET check box to write a True or False value into a SQL database. Having a bear of a time with this.
See my sample data / database schema here:
http://sql-paul.com/press/default.aspx
I was trying to build some programming with Psuedo Code snips from the net... does this logic make sense?
***********
***********
Expand|Select|Wrap|Line Numbers
- if chkDayShift is selected
- write to sql table the value 1 (true)
- where column name = current checkbox's label
- else
- write to sql table the value 0 (false)
- where column name = current checkbox's label
- ***********
- if chkDayShift is selected
- write to ref2 value 1
- where dayshift = chkDayShift
- else
- write to ref2 value 0
- where dayshift = chkDayShift
- ***********
*******************************
Code to check a CheckBox's state
********************************
Expand|Select|Wrap|Line Numbers
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_
- System.EventArgs) Handles Button1.Click
- If CheckBox1.Checked = True Then
- TextBox1.Text = "Checked"
- Else
- TextBox1.Text = "UnChecked"
- End If
- End Sub
Any help would be great... source samples if you can please.
Best,
Paul