Hi,
I am stuck with a problem on labels. I have 30 labels on my from. And from one method i am returning a value, based on it i have to make one label as invisible.
I took switch - case, but i am guided to take object of that label and make it invisible.
I followed this code, but it is throwing error.
Label ToHide = new Label();
ToHide = Convert.ChangeT ype("Label"+ind , TypeCode.Object );
(ToHide as Label).Visible = false;
Here ind is int returning from one method, and i am concatinating it to get label name.
I am stuck with a problem on labels. I have 30 labels on my from. And from one method i am returning a value, based on it i have to make one label as invisible.
I took switch - case, but i am guided to take object of that label and make it invisible.
I followed this code, but it is throwing error.
Label ToHide = new Label();
ToHide = Convert.ChangeT ype("Label"+ind , TypeCode.Object );
(ToHide as Label).Visible = false;
Here ind is int returning from one method, and i am concatinating it to get label name.
Comment