Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping added controls on postback
Message
De
21/05/2006 12:40:11
 
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:
01123824
Vues:
18
>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...

Thanks for the help

I modified my code as this:
<script runat="server">
    Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        LXFramework.oPage = Me
        Dim loDataEntry As DataEntryDBUsersAdmin = New DataEntryDBUsersAdmin(LXFramework)
        loDataEntry.GenerateForm()
    End Sub

    Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'LXFramework.oPage = Me
        'Dim loDataEntry As DataEntryDBUsersAdmin = New DataEntryDBUsersAdmin(LXFramework)
        'loDataEntry.GenerateForm()
        LXFramework.BeforeEndRequest()
    End Sub
</script>
I obtain the same result. When I first access the first, everything is ok. The loDataEntry.GenerateForm() adds the additional controls on the page has needed. But, on postback, which is handled by loDataEntry.GenerateForm(), all the additional controls on the page that were added at runtime when the page was initially loaded are lost.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform