Adding Event Handler

T

Trecius

Hello, Newsgroupians:

I am starting to learn ASP .NET, and I'm using Visual Studio 2005. I am
following a book as my guide. However, I'm having some problems
automatically creating methods for my event handlers.

To start, it tells me to create a new "Web Form" by going to File --> New
--> File... --> Web Form. This creates a file for me called Default1.aspx.
In the design mode, I drag a button control onto the whiteboard, or document,
and try to proceed to add the button's click event handler.

I click the button; I view the properties window. In the properties
windows, I click the events button, which is the lightning bolt. I try to
double-click the "Click" event, but it just switches me to the "source view."
So I go back to the properties window and -- this time -- I type in the name
of the handler for the click event. This time, Visual Studio adds the
attribute "OnClick" to the definition of my button; however, it does not
populate the <script> section with the method. Any ideas why it doesn't work?

I've also tried selecting the button from the drop-down menus at the top of
the source view and then selecting the Click button. I get no results; it
doesn't add the method.

Thank you.


Trecius
 
J

JM

I click the button; I view the properties window. In the properties
windows, I click the events button, which is the lightning bolt. I try to
double-click the "Click" event, but it just switches me to the "source
view."

Double click on the button instead.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top