In C# Winforms, while user first load the form, I get the input as a label ‘text’ into database by clicking on that label. After again if another user loads that form, I want to make that label disabled. How can I make that ?? This is the form sample

This is I’m tried:
- If the user clicks more than one label I get the input string as ” E10,E9,E8,E7 etc., “
-
when another user loads the form I retrieve that string and split
that by using “,” and stored it in a arrayBut I don’t know how to make that label disable from the array. Help Please.
*strong text*1.- Do a loop in your array
2.- Find the label using the name of the label (I’ve supossed that the name of the label is the same that the imput string you have in the array)
3.- Disable the control
I don’t have a compiler here right now, I hope it runs. Please, be understanding if not.
Edit: Find a label by his text property:
Please, note that if the label is inside a panel, groupbox, or any content control you will have to udo contentControl.Controls instead of using ‘this’.
Edit 2: Ok, This code works for me. I’ve a label with text “Sample”.