Button event with Asp.net

Asked

Viewed 528 times

0

I create a boot in Asp.net, put onclick "testBotao", and tighten F7, but it does not load the event, only the pageLoader. How do I capture the event?

  • 1

    Did you know that you can vote on the answers you are given? I noticed that you do not vote. Accepting an answer is not the only way to reward those who helped you. The vote can be cast on all answers and questions from website that you think you deserve. Not only in your posts. But especially in responses to you, it would be nice for you to vote for everyone who helped in any way. Remembering that acceptance can only one, but vote can all you want. I’m not saying to vote for answers that didn’t help at all. If you can review all your questions and vote for useful answers.

2 answers

2

onclick="btnMeuBotao_Click" and not onclick"testeBotao"

and in the Behind:

protected void btnMeuBotao_Click(object sender, EventArgs e)
{....}

2


When typing the OnClick="" you can squeeze Ctrl + Space inside the quotes and select <Create New Event>

inserir a descrição da imagem aqui

And your method will be created in code-Behind.

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.