We have a form with two panels on it. In the first panel, we have a custom label control that displays the time. The initial time for this control is set using an InvokeMethod so once the page loads, the control starts after given a "seed time" and then keeps time on it's own. This means that the server is unaware of the control's value. The seed value is established in the form load of our main form.
We use the second panel to load user controls that provide different functions for the user. Each user control is "replaced" in the panel with the next control in the flow by calling a method on the main form to load the next control (this is for a mobile application). This method "removes" the calling control and replaces it with the next one in the sequence.
The problem that we have is that when we load a new user control in the second panel, the entire main form is being redrawn, including the first panel. Since the server does not know about the value in the custom label, it gets reset to the original value.
To work around this problem, we call the javascript via the InvokeMethod each time we load a user control in the main form, but this causes the value in the custom label to disappear for a second or two, then reappear.
Is there a way to prevent the whole form from redrawing and resetting our custom label? I thought only the "changed" section of the screen would update (ie. the loading of the user control), but it appears that the entire form is refreshing.
Thanks,
Allen