G
Guest
How do you refresh the controls on a panel?
I've got a VB webform which contains a panel. On that panel is a
checkbox and a textbox. I'd like the textbox to appear when the
checkbox is checked and disappear when the checkbox is unchecked.
My code is:
Private Sub checkBox1_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles checkBox1.CheckedChanged
If checkBox1.Checked Then
textBox1.visible=False
else
textBox1.visible=True
end if
End Sub
The CheckChanged routine is being called when I check/uncheck the
checkbox. However, The TextBox doesn't disappear. The page needs to
be refreshed, but there doesn't seem to be anything like
Panel1.Refresh() or textBox.Refresh()
I've got a VB webform which contains a panel. On that panel is a
checkbox and a textbox. I'd like the textbox to appear when the
checkbox is checked and disappear when the checkbox is unchecked.
My code is:
Private Sub checkBox1_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles checkBox1.CheckedChanged
If checkBox1.Checked Then
textBox1.visible=False
else
textBox1.visible=True
end if
End Sub
The CheckChanged routine is being called when I check/uncheck the
checkbox. However, The TextBox doesn't disappear. The page needs to
be refreshed, but there doesn't seem to be anything like
Panel1.Refresh() or textBox.Refresh()