Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8882063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:29:03+00:00 2026-06-14T20:29:03+00:00

basically i got no idea to starts so i cant provide any better code

  • 0

basically i got no idea to starts so i cant provide any better code
i have a null label

lblErrorMsg = "" ;

once if there are any error, my label will display error msg with css

lblErrorMsg.Text = "some error Msg";

at the same time i am trying to display another image label as well, but i dont want to make it like button click then display the error msg, due to this is an on-going project, so there are lot of button, so what i want to ask is, is there any method can perform during page load to detect label text change?

something like

pageload(){
    check lblErrorMsg
    if(lblErrorMsg.Text!=""){
         lblImg.Visible= true;
     }else{
         lblImg.Visible= false;
     }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:29:05+00:00Added an answer on June 14, 2026 at 8:29 pm

    You need to use javascript/Jquery for that. Listen to onload event and do the logic.

    You can try putting this in the script tag of your aspx page

            window.onload = function(){
                var element = document.getElementById('<%=lblErrorMsg.ClientID%>');
                var lblMsg = document.getElementById('<%=lblImg.ClientID%>');
                lblMsg.style.display='none';
                if(element.innerHTML.length)
                     lblMsg.style.display = 'block';             
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, here is where I got the idea from: There was once an app
So basically I have got an idea and I want to hear your opinions
Basically I've got a code which should load a lot of images so I
I have got a pipeline of tasks which basically is a variation of chain
I have some Javascript code that is basically an elapsed timer for a file
I've basically got a table with 2 rows and it looks like this: ---------
Basically i got this for loop and i want the number inputed (eg. 123)
Basically I just got some results back for an assignment and my results were
Basically I've got some structs of type Ship which are going to go on
I've got a program made basically from a ListCtrl and has an add button,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.