Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MasterPages with UserControl
Message
De
06/03/2009 12:25:08
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01386241
Message ID:
01386255
Vues:
33
>>All,
>>
>>I have a Master Page and I have added a user control to it. The user control has an ajax Timer that will popup a window to notifiy the user that they have an expirating item and would need to proceed to checkout to secure the item.
>>
>>The problem I'm having is that the User Control is being rebuilt on the Master Page each time the user navigate to a new content page, thus resetting the timer interval and this is the behavior I do not want. I have tried loading properties in the viewstate but that doesn't work. (the control is rebuilt on each page, no viewstate)
>>
>>Has anyone encounter this problem? Any help would be welcome.
>>
>>Evans
>
>Yeah, you're going to run into that problem anytime you navigate since, like you're seeing, it's rebuilding the page when you navigate. You could have your main page open another pop-up window that has the timer on it - it will stay on the same page even as you navigate through your main site. The other thing you could do is use frames - hide the frame that contains the timer.

If this approach doesn't work, I can post some code that I use to save custom values to ViewState. I think this may solve your problem.

However, I don't think I will have time to do it today.
Very fitting: http://xkcd.com/386/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform