Nate Pet
Nate Pet

Reputation: 46222

Making ASP.NET label visible appears to have no effect

I have the following in my code:

 lblIsInvalid.Visible = True

I have noticed that even after going to this line, it does not make the label visible. I am thinking this may be a refresh issue as the last line hit is lblIsInvalid.Visible = True. Is there any refresh property that I may not be aware of for a label control.

Upvotes: 0

Views: 626

Answers (1)

Steven Doggart
Steven Doggart

Reputation: 43743

If this is a WinForm project, no, label visibility works the way you expect. If you set it visible and it's not showing up, it's most likely because it's inside a container parent control which is not visible, or it's location is off the viewable area of the form, or it's behind another control, or something is setting it invisible again.

Upvotes: 1

Related Questions