views:

516

answers:

4

My department is currently converting all of our projects from 2.0 to 3.5, and we are experiencing an odd side effect. It seems that most, if not all, control events aren't firing after we convert the projects to the 3.5 framework. At least not initially. Case in point, I was looking at one of our internal interfaces that had been converted, and none of the button click events of drop-down selected index changed events were firing. I moved on to something else unrelated then went back to the page approximately 2 hours later, and then the events were firing.

I've loaded the .aspx page in Design mode and ensured that the events were tied properly to the code-behind methods, and some projects still don't respond to events.

Has anyone experienced this? I've done some searching on the web and have not been able to find any relevant answers. Any information would be greatly appreciated!

James

A: 

I haven't experienced something like that, but the closest I can think of are:

  • AutoWireEvents - for Page_Load, etc. If the methods are not configured explicitly in generated code, this should be set to on.
  • If you are configuring events on the aspx like OnClick="something_OnClick", make sure the methods in the code behind are protected (instead of private). That said, it is weird, as my experience with it is that it fails to compile if it is set wrong.
eglasius
A: 

I am having this same issue -- I'd say I have about a 33% chance of a page's buttons not being wired up. In other words, 2 out of every 3 times I navigate to the page it seems to work, but that third time NONE of the buttons on the page work.

I seem to have it narrowed down to pages with a ScriptManager on them, but I have no idea why that matters.

nathaniel
A: 

Have you tried the solution posted here? Apparently a similar problem occurred when people installed .NET Framework v1 SP1. You may be able to tailor this solution to .NET 3.5 as well.

You may also want to try this response to a similar question here on stackoverflow.

StriplingWarrior
A: 

I have a similar problem except that it ALWAYS works in FF, Chrome and Safari, and NEVER in IE8 or 7. When I manually write the even handlers in, it works. Same exact behaviour on both the development and production servers.

Alex Abramov