button event with asp.net

0

I create a button in asp.net, put onclick "testBotao", and press f7, but it does not load the event, just the pageLoader. How do I capture the event?

    
asked by anonymous 03.02.2015 / 11:34

2 answers

2

When typing OnClick="" you can press Ctrl + Space within the quotation marks and select <Create New Event>

Andyourmethodwillbecreatedinthecodebehind.

    
03.02.2015 / 12:11
2

onclick="btnMeuBotao_Click" and not onclick"testeBotao"

and in the behind do:

protected void btnMeuBotao_Click(object sender, EventArgs e)
{....}
    
03.02.2015 / 11:52