I have the following line in my code, inside the click event handler of an ImageButton:
Protected Sub FinaliseBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles FinaliseBtn.Click, SubmitPaymentViaChequeBtn.Click
Dim str as String = sender.commandargument.ToString.ToLower
End Sub
Both Controls are ImageButton
's. However, I'm getting the following error:
Property 'CommandArgument' is WriteOnly.
Can anyone see why I'm getting this error as usually I can read from a CommandArgument inside an event handler. In fact, surely thats their main use!
Thanks.