Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with variable
Message
From
07/09/2006 23:25:30
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Problem with variable
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01152158
Message ID:
01152158
Views:
82
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
Next
Reply
Map
View

Click here to load this message in the networking platform