Last post Dec 20, 2016 05:03 PM by Mongol648
Dec 20, 2016 04:38 PM|Mongol648|LINK
I thought this would be simple but apparently it is not. I am trying to make a textbox visible and populate current date/time based on a checkbox. the check works but when unchecked, nothing happens.
Protected Sub CheckBox11_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
If CheckBox11.Checked = True Then
TextBox20.Visible = True
TextBox20.Text = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")
Else : CheckBox1.Checked = False
TextBox20.Visible = False
TextBox20.Text = ""
What am I missing?
Dec 20, 2016 04:47 PM|codemovement.pk|LINK
write it like this for more
Else TextBox20.Visible = False TextBox20.Text = ""
Dec 20, 2016 04:50 PM|Mongol648|LINK
Tried that but does not work. Both the checkbox and textbox are in an Update Panel. Does that make a difference?
Dec 20, 2016 04:59 PM|codemovement.pk|LINK
Dec 20, 2016 05:03 PM|Mongol648|LINK