I've recently begun migrating an ASP.NET project from .NET version 1.1 to 4.0. This system currently runs on customer site and works. When I migrate the solution via the VS wizard, I don't get any errors. The error is that no server control events work and the viewstate is always empty.
I've tried explicitly setting ViewStateMode
to Enabled and AutoEventWireup
to true.Unfortunately nothing works. The project is not written as a Web Application (converting does not solve the problem).
I've also check whether all server controls hav IDs set (they do).
The project has its own master page system and there is a thick layer upon System.Web.UI.Page that might break a lot of things, but so far I haven't been able to find the source of trouble.
Is there any particular setting that I should check (i.e. the default values changed since .NET 1.1) or can you give me some tips why this might happen?
EDIT 1: These are the values that get posted when clicking on a LinkButton:
CRC=-2134936892&_EVENTTARGET=MPage%24BC%24TestButton&_EVENTARGUMENT=&_VIEWSTATE=&_EVENTVALIDATION=%2FwEWAwL%2BraDpAgLB49K8AwKy8rFAt4Axk3NlUEWxrtY%2FRtaexH%2F634CkJe6G9Im5EOPXtVw%3D
EDIT 2: I've examined the custom master page mechanism closely and I found that it makes extensive use of Server.Transfer(...)
method before jumping to the right page. Is this a possible cause of the missing ViewState? (then it would be strange that the EventTarget is always persisted) And more importantly, could there have been any change between 1.1 and 4.0?