Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

Button events stopped working

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CsaaGuy - 21 Jul 2005 00:18 GMT
My button events stopped working on a aspx form. Dont' know why. any
suggestions?
Brock Allen - 21 Jul 2005 02:01 GMT
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.

-Brock
DevelopMentor
http://staff.develop.com/ballen

> My button events stopped working on a aspx form. Dont' know why. any
> suggestions?
WJ - 21 Jul 2005 03:57 GMT
>. 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
Eliyahu Goldin - 21 Jul 2005 09:58 GMT
> 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
WJ - 23 Jul 2005 03:25 GMT
> 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
Eliyahu Goldin - 24 Jul 2005 10:10 GMT
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

> > The ultimate solution is to assign event handlers inside control tags in
> > the
[quoted text clipped - 4 lines]
>
> John
WJ - 24 Jul 2005 10:28 GMT
> 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
Eliyahu Goldin - 24 Jul 2005 10:53 GMT
> Most bugs will go away in VS.net 2005. Try the recent beta, you will like
> it.

How does it help those who use VS 2003?

> > 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.

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
Brock Allen - 24 Jul 2005 17:12 GMT
>> Most bugs will go away in VS.net 2005. Try the recent beta, you will
>> like it.
>>
> How does it help those who use VS 2003?

It give you hope? :)

-Brock
DevelopMentor
http://staff.develop.com/ballen

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.