mardi 2 octobre 2018

TexBox wont enable even if the statement is executed in debug

I am working on a project wrote in Visual Basic. I have a check Box and e TextBox and i want to enable the TextBox when the checkbox is checked. This is my code:

    Public Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged

    Dim CheckBox3 As CheckBox = DirectCast(sender, CheckBox)
    convertToStaff = CheckBox3.Checked

    If convertToStaff = True Then
        Dim RadTextBox2 As New RadTextBox

        RadTextBox2.Enabled = True

        Session("convertToStaff") = convertToStaff
    End If

End Sub

For some reasons i am not understanding the textbox will not enable even that when i debug i can see that enters in the if statement and executes the row to enable the textBox.

Any idea where i am doing wrong?




Aucun commentaire:

Enregistrer un commentaire