all groups > visual studio .net debugging > april 2006 >
You're in the

visual studio .net debugging

group:

Event does not fire!


Event does not fire! MSG Servicos de Informatica
4/6/2006 12:12:02 PM
visual studio .net debugging:
Hi All!

I'm having a problem with an application that I converted to Visual Studio
2005;
The problem follows below.
My Application (ASP .NET with C#)constructs the GUI dinamically. The app
have Buttons that I change their events manually like the line bellow:

Button myButton = new Button();
myButton.Click += new EventHandler(<My method>);

This code worked a long time when this application was in Visual Studio 2003
with Framework 1.1, but when I converted to Framework 2.0 (with Vs.net 2005)
the event does not fire.
The Application only do the PostBack but does not fire the event of the
button!

What can I making wrong?

Thanks in Advance!

--
MSG Servicos de Informatica
RE: Event does not fire! MSG Servicos de Informatica
4/6/2006 12:19:02 PM
Note:
I created other project to isolate the problem. I wrote this code and it
worked normally.
What's diferent in my application of this other test application??
The code that associate the event handler is in a class library.
Ok!
I have been moved the code to my application, and not worked again! :(


--
MSG Servicos de Informatica
Rio de Janeiro / Brazil


[quoted text, click to view]
RE: Event does not fire! jetan NO[at]SPAM online.microsoft.com (
4/7/2006 12:00:00 AM
Hi,

Thanks for your post!

It seems that your problem is project specific, which does not exist in a
new sample project.

Regarding your issue, I suggest you comment your code snippet one by one to
narrow down your problem to a much simpler project. Thanks

Additionally, I do not think this issue has too much to do with
vsnet.debugging, you'd better post such issue in Asp.net newsgroup.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button