Solved

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

Posted on 2009-04-03
3
283 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 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