Button events stopped working

B

Brock Allen

If you're using VS.NET 2003, check the codebehind file's InitializeComponent
metho. There's a bug where sometimes VS.NET removes all the code that wires
up the event handlers.
 
W

WJ

Brock Allen said:
. There's a bug where sometimes VS.NET removes all the code that wires up
the event handlers.

The codes are still there. Just the event that was unhooked from the
"control". Especially when you perform a cut and paste of an eventfull
control from one location to the next, even in the same form. All you need
to do is click on the lightenning icon from the event property page, and
re-hook the event from the "onClick" property drop-down list.

John
 
E

Eliyahu Goldin

All you need
to do is click on the lightenning icon from the event property page, and
re-hook the event from the "onClick" property drop-down list.

And wait for the events to disappear another time.

The ultimate solution is to assign event handlers inside control tags in the
..aspx file.

Eliyahu
 
W

WJ

Eliyahu Goldin said:
The ultimate solution is to assign event handlers inside control tags in
the
.aspx file.

What a bad practice! I would not do this. Code-behind should be in its own
nest. Not embeded in Html.

John
 
W

WJ

Eliyahu Goldin said:
It's a good practice. It takes control from famously buggy Design View to
your hands.

Most bugs will go away in VS.net 2005. Try the recent beta, you will like
it.
Many avoid using html view for simple reason of not understanding how an
aspx page builds and works.

Very wrong perception! Separation of "codes" are main purpose of .NetFW.
Reasons:

1. Ability to derive cleaner codes.
2. Ability to separation duty between web designer and programmer.
3. Security: No business logic exposed to aspx or html part. This last one
is very important. Hide codes from hackers. This does not mean that your
system is absolutely, however, by hiding system logic, it makes hackers to
work harder.

BTW: What an obscure and convoluted HTML is !

John
 
E

Eliyahu Goldin

It's a good practice. It takes control from famously buggy Design View to
your hands. Many avoid using html view for simple reason of not
understanding how an aspx page builds and works.

Eliyahu
 
E

Eliyahu Goldin

Most bugs will go away in VS.net 2005. Try the recent beta, you will like

How does it help those who use VS 2003?
Very wrong perception! Separation of "codes" are main purpose of .NetFW.

The question is not where to keep the code. The question is where to set the
properties. If you don't set event properties in the html, *you* don't set
them in the code-behind either. Design View is the one who does it.
According to your logic you should've suggested setting the properies in the
code by the programmer. BTW, I have absolutely nothing against this. What I
don't like in the Design View.

Eliyahu
 

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

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top