Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When are control properties available
Message
De
14/05/2008 17:36:44
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
When are control properties available
Divers
Thread ID:
01317170
Message ID:
01317170
Vues:
45
Can someone tell me with .NET, when do the control properties become available? With the following code
    Protected Sub Page_init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        Dim CurrentRecord As Int32 = Request.QueryString("user_id")
        Dim i As Int32

        Response.Write(CurrentRecord)               ' For testing
        Response.Write(VarType(CurrentRecord))      ' For testing
        Response.Write(FormView1.DataItemCount)     ' For testing

        For i = 0 To FormView1.DataItemCount - 1
            Response.Write(i)
            If FormView1.DataKey(i).value = CurrentRecord Then
                FormView1.PageIndex = "3"           ' For testing
                Exit For
            End If
        Next
    End Sub
the third response.write produces a 0 even though the formview has several records available to it. Probably my code is wrong but I think I'm getting close. The Formview1.init is set to Page_load.


Thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform