When I update the .dlls in my C# ASP.Net application, the transition is handled gracefully and the users are allowed to finish their requests before the code is switched over to the new code.
My question is do the static variables reset when that is done or do they persist through the update (if of course the static objects themselves aren’t updated in the code)?
Yes, they are lost and recreated, the DLL forces the application domain to stop and restart. All cache and other items are re-filled and created as used/needed.
You must look at a persistent store if these values are to be retained for any actual amount of time as your AppDomain can and does restart for many other reasons as well.