Test events do not fire after ASP.NET 3.5 conversion

My department is currently converting all our projects from 2.0 to 3.5, and we are experiencing a strange side effect. It seems that most, if not all, control events do not work after converting projects to structure 3.5. At least not initially. The fact is that I looked at one of our internal interfaces that were converted, and none of the events for pressing the button for the drop-down selected indexes changed the events. I went over to something else unrelated, and then returned to the page after about 2 hours, and then the events fired.

I loaded the .aspx page in design mode and ensured that events were correctly bound to code methods, and some projects still did not respond to events.

Has anyone experienced this? I did some searches on the Internet and could not find answers to any questions. Any information would be greatly appreciated!

James

+1
source share
6 answers

I see a similar problem, except that it ALWAYS works in FF, Chrome and Safari and NEVER in IE8 or 7.

When I manually write even handlers, it works. Exact exact behavior both on development servers, and on production.

+1
source

I have not experienced something like this, but the closest I can think of:

  • AutoWireEvents - for Page_Load, etc. If the methods are not explicitly configured in the generated code, this should be set to.
  • If you configure events on aspx, for example OnClick = "something_OnClick", make sure that the methods in the code behind are protected (instead of private). However, this is strange, since my experience is that it cannot compile if it is not installed correctly.
0
source

I have the same problem. I would say that I have a 33% chance that the page buttons will not be connected. In other words, 2 times 3 times I go to the page on which it works, but the third time NONE of the buttons on the page works.

It seems to have narrowed down to pages using the ScriptManager, but I have no idea why this matters.

0
source

Have you tried the solution posted here ? Apparently, a similar problem arose when people installed the .NET Framework v1 SP1. You may also be able to adapt this solution to .NET 3.5.

You can also try this answer to a similar question here in stackoverflow.

0
source

I was suffering from the “events not firing” problem and found a problem / solution that might help some users. I run my dev websites on Chrome (being my default browser), but I find that from time to time some user interfaces will work for a while and then suddenly all events will stop firing. It was very unpleasant for debugging until I got a bright idea to try testing the user interface in IE. I started using the user interface in IE, and then (as expected) all events stopped shooting (just like in Chrome). But (unlike Chrome), sitting in the lower left corner of the IE browser, there was a warning icon with a message like "done, but with errors on the page." This was a problem all the time: an error occurred that did not appear in the main part of the browser (i.e. the user interface still looked as if it was functional). In Chrome, the lack of a visual warning that a problem occurred showed that everything was in order. My error is related to a security issue (Sys.WebForms.PageRequestManagerServerErrorException: invalid feedback or callback argument), but there may be many errors that cause the user interface to disconnect from the event model. I don’t know how to enable the warning mechanism in Chrome, but if you have problems with “events that do not fire”, start the user interface in IE and look closely in the lower left corner of the browser.

0
source

I encountered the same problem when converting a site from .net 1.1 to 3.5. As in the first post on some pages, the buttons work fine, but on others they don’t. There is no common ground between pages that do not work.

I tried to change the code so that it matches the pages that work, changing the usage statements, changing the autowireevent property that should be specified, and set it to true by deleting the system keyword where it is not needed. I also tried to specifically add events to pageload as with:

this.dlCVs.ItemDataBound += new System.Web.UI.WebControls.DataListItemEventHandler (this.dlCVs_ItemDataBound); this.dlCVs.ItemCommand += new System.Web.UI.WebControls.DataListCommandEventHandler (this.dlCVs_ItemCommand); this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click); this.btnHome.Click += new System.EventHandler(this.btnHome_Click); 

Interestingly, despite the fact that the above itemdatabound event really works, so only buttons that don't work don't work.

So far, the only solution I've come across is to delete the page, and then recreate it and copy it in separate sections of the code. If I copy the code into one large block, this solution does not work.

0
source

All Articles