i feel like I’m doing something wrong for a long time already. I usually have some fields, for example: lets take upload control I select a file and then click upload button. So It should tell me whether there was “no file selected” or “uploaded successfully”.
What I do is: I hide both labels and then I enable them in code behind depending on condition. If I am going to change file again, or I have more states, then my code become messy with a lot of label.visible=true statements. How do you handle this thing?
Thanks!
Use one
Labelcontrol, then set its.Textproperty in your code behind based on the message you want to pass to the client.ASP:
C#: