asp.net vb.net keep a label in a masterpage ever

I need keep a message label in a master page ever. But when pass to a new page the masterpage lose  the label content. How can keep the message label on every pages and only change when i modify.
rflorencioAsked:
Who is Participating?
 
y0usufConnect With a Mentor Commented:
yep It will disappear because you did it from default.aspx. Master page is just like a user control.
What you can do is use session to store the label text . And then In the page_load event of master page write the text from the session to the label.  You need to save text into the session variable when you write message from the page.
0
 
y0usufCommented:
Where do  you set the label text from? If you are setting the label text from the  codebehind of masterpage you should not loose the label text. Can you provide more details on the issue, because it is kinda strange that you are not seeing the controls residing in the master page.
0
 
rflorencioAuthor Commented:
For ex. i am in the default.aspx page and write a message in a label control in masterpage. Then when i move to another page like products.aspx the message i had write in master page disappears.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.