Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hello,

I am working on ASP.Net website with Visual Basic as backend language. I am working on Master-Child webpages. I have created a Public string property on Master page and want to permanently change its value. When I change value of property it is updated properly, but when I move to some other content page and try to access that value, than Master page string returns nothing.
Here is code of property.

VB.NET
Public _patient_id As String
   Public Property patient_id() As String
       Get
           Return _patient_id
       End Get
       Set(ByVal value As String)
           _patient_id = value
       End Set
   End Property

I will be really thankful if you suggest some solution to permanently update value of string.
Thank you
Posted
Comments
Afzaal Ahmad Zeeshan 6-Dec-15 18:53pm    
Make it static!
Member 11656452 6-Dec-15 19:07pm    
The main purpose of this variable is that we can store values in it dynamically and can access it from different content pages. Values are assigned to it according to Log in information of user on run-time
Afzaal Ahmad Zeeshan 6-Dec-15 19:15pm    
Then I would recommend using session variables. Is this online or offline application?
Member 11656452 6-Dec-15 19:20pm    
It is ASP based assignment and not published online. Will you please send me example session variables.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900