We help IT Professionals succeed at work.
Get Started

Asp:Label not displaying on web pages

Juan Ocasio
Juan Ocasio asked
on
47 Views
Last Modified: 2020-03-23
Hello all:

I have a old asp.net web form application I have been tasked to maintain.  I have a Site.Master page that I've added some server controls on.  This page mainly hold a menu bar with links to various other pages. When someone clicks on a link in a specific section of the menu, they are directed to a sub-folder containing other pages.  These pages are not linked to the master page.

So my issue is on these pages that are not linked, I have an asp:label control that I am trying to populate via ConfigurationManager.AppSettings.  The problem is when the page renders, nothing is showing up, not even the span that would've been created with the asp:label.

The purpose of this control is to display what environment the user is in.  I have it on the Site.Master and it works well, but on the individual page that is not associated with the Site.Master, it does not show up.

on Site.Master:
<asp:Label ID="EnvironmentDescr" runat="server" CssClass="environmentDesc" Text="<%$ AppSettings: EnvironmentDescription %>" />

on individual page:
<asp:Label ID="EnvironmentDescrDO20" runat="server" CssClass="environmentDesc" Text="<%$ AppSettings: EnvironmentDescription %>" />

Can someone please let me know what I am doing wrong?  I have other asp:label controls on the individual page and they're all working.

Many thanks for your assistance!

Juan
Comment
Watch Question
Continuous Process Improvement Lead
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE