I have a form with a submit button which I want to disable upon submitting (so the user does not submit the form content twice).
The form has 2 mandatory fields that should be filled in, so an easy on click disable button (client-side) will not do the trick i'm afraid.
Protected Sub Btn_SubmitContact_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Btn_SubmitContact.Click
If Page.IsValid Then
Btn_SubmitContact.Enabled = False
//all other logic
End If
End Sub
This does not change the attribute of the key, the user can still click the button and post the content twice. I understand that some refresh/update needs to happen for the button to change...
Can someone please explain me how this works?