J
Jon
Hello all,
is it possible to cast a string to a Label?
I have a Label by the name of lblStatus, a string varible
called status that I set to be = "lblStatus".
I then want to be able to do something like (example):
Label l;
l = (Label)status;
l.text = "Open".
This would then set the text of Label lblStatus = "Open".
The reason I'm doing this is beacuse I have multiple
Labels on a form and am passing a string into a method
that represents the Label that needs to be updated (it's a
string becasue it's coming from a Hashtable value, ie
myHash[Key]).
Hope there's help!
Thanks,
Jon
is it possible to cast a string to a Label?
I have a Label by the name of lblStatus, a string varible
called status that I set to be = "lblStatus".
I then want to be able to do something like (example):
Label l;
l = (Label)status;
l.text = "Open".
This would then set the text of Label lblStatus = "Open".
The reason I'm doing this is beacuse I have multiple
Labels on a form and am passing a string into a method
that represents the Label that needs to be updated (it's a
string becasue it's coming from a Hashtable value, ie
myHash[Key]).
Hope there's help!
Thanks,
Jon