G
Guest
Private Sub txtLastName_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtLastName.TextChanged
If Me.cmdAction.Text = "Update" Then
Me.cmdAction.Enabled = True
End If
End Sub
The above code seems like it should work but doesn't.
The effect I'm trying to get is to prevent a user from clicking an "update"
button unless the user actually changes anything... so the button is supposed
to stay disabled as long as nothing has changed - but as soon as it changes -
I'd like the button to be available again.
Do I need to consider the IsPostback property to get this to work properly?
System.EventArgs) Handles txtLastName.TextChanged
If Me.cmdAction.Text = "Update" Then
Me.cmdAction.Enabled = True
End If
End Sub
The above code seems like it should work but doesn't.
The effect I'm trying to get is to prevent a user from clicking an "update"
button unless the user actually changes anything... so the button is supposed
to stay disabled as long as nothing has changed - but as soon as it changes -
I'd like the button to be available again.
Do I need to consider the IsPostback property to get this to work properly?