0

I haven't coded in 4 years and I am getting back into it. I was wondering why, when I double click a button to create an event handler on a webform, that the event handler is not generated automatically inside VS2017. Plus, when I wrote a event handler for the button, the handler still doesn't fire when the button is clicked after I try to use the button as an end user. I even set break points in the written button event handler to check out my code as it calls functions, and no luck.

I have looked for a solution but I didn't find one. Is there a VS2017 patch I need or can I roll back a VS2017 update?

Thanks!

PS - I am now disabled and trying to get my life back through programming again. It definitely is a slow process.

1 Answer 1

2

When your button is selected in the designer (either design view or source view) open the Properties window. On the little tool bar at the top of the properties click the lightning bolt icon. This will display all the events for that control. Double click beside the Click event (you have given your button an ID, yes?) Your click event will appear in the code window with a Handles clause that hooks it up to the button. BTW, Welcome to Stack Overflow.

Sign up to request clarification or add additional context in comments.

4 Comments

Thank you very much for the answer! I did try that and it worked in 2013 (ugh!), but I had an issue in 2017. After more searching I found that several others had the same problem due to a 2017 update. I feel that this answer,though, is good to be marked as a resolution. Thank you for the welcome!
I appreciate you relating your story! It means a lot to me. I did uptick the answer, but apparently I do not have enough "points" to mark something as THE answer. I got a message that said I had to wait for some kind of approval.
The uptick is an upvote. You need to click the Check Mark, (Tick mark) not the up arrow. Glad you are with us. SO is an amazing source for information.
There we go. Sorry I missed it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.