Button action from vb .net does not work

1

I want to do a simple action when a button is clicked but nothing happens.

Aspx file

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderNormal" runat="server">
    <asp:Button Text="text" runat="server" ID="Teste" />
</asp:Content>

Aspx.vb file

Private Sub Teste_Click(sender As Object, e As EventArgs) Handles Teste.Click
        Teste.Text = "asdasd"
End Sub

In this case nothing happens when the button is clicked. If I put an onclick event on the button this error happens:

    
asked by anonymous 28.05.2018 / 19:39

0 answers