Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Putting something the bottom of page?
Message
De
10/03/2012 12:08:34
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01537854
Message ID:
01537932
Vues:
20
>Yes, I will move this user control outside the Form.

Then, you can do something like this:
            Dim loHiddenField As System.Web.UI.WebControls.HiddenField = New System.Web.UI.WebControls.HiddenField
            Dim loHtmlForm As System.Web.UI.HtmlControls.HtmlForm = New System.Web.UI.HtmlControls.HtmlForm

            ' Try to find the Form control
            loHtmlForm = oPage.FindControl("Form1")

            ' If we have a form
            If Not loHtmlForm Is Nothing Then
               loHiddenField.ID = tcName
               loHiddenField.Value = tcValue
               toForm.Controls.Add(loHiddenField)
            End If
In this example, which you might have to adjust a few things, I locate the form first. All my forms are named Form1. But, that can be parameterized. If it exists, I create a hidden control, which is INPUT Type=Hidden. I assign its ID and its value. Then, I add it right after the Form. Which is what you are looking for I think. This is VB.NET but that should give you an idea on how to add a control right after another one.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform