Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping added controls on postback
Message
 
À
21/05/2006 02:47:27
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01123789
Message ID:
01123792
Vues:
13
This message has been marked as the solution to the initial question of the thread.
>I just discovered that added controls, from the code behind, are lost on postbacks. Those controls are added from the code behind because there is a lot of business logic that will determine what controls to add on the form based on the tables. However, on postbacks, they all disappear. What would be the proper approach to use in such situation?

You need to add the controls eaerlier in the Page cycle. If you load them on Page_Load as I suspect you are POST back assignment (as well as Viewstate) have already occurred. You'll want to try and do this in OnInit() if possible...
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform