Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with variable
Message
De
07/09/2006 23:25:30
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Problem with variable
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01152158
Message ID:
01152158
Vues:
84
There is a private variable in my WebForm, it was assigned with value during Page.Load function. But when I try to get the value in button click event, it becomes null value, any advise would be appreciated, thanks.

Here is my piece of code :
Private myReference As String

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    AddNewRecord()
End Sub

Private Sub AddNewRecord()
    Me.myReference = "ABC00001"
End Sub

Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
    ' Show null value ?
    Msgbox(Me.myReference)
End Sub
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform