Have you considered using an Page_Unload method, and then backing it up through javascript on the <body onUnload="stopDevice()"> where stopDevice() is a javascript function?
This way you can have your C# or VB.NET to end your device transmission and a javascript backup just for insurance.
I have never dealt with the situation you are in, so I cannot be very good help, but hopefully I can lead you into a better direction.
Reputation Points: 43
Solved Threads: 68
Veteran Poster
Offline 1,080 posts
since Sep 2007