Solved

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

Posted on 2009-04-03
3
286 Views
Last Modified: 2012-05-06
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.
0
Comment
Question by:rflorencio
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:y0usuf
ID: 24062323
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
 

Author Comment

by:rflorencio
ID: 24062597
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
 
LVL 4

Accepted Solution

by:
y0usuf earned 500 total points
ID: 24062891
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

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question