Problems with reading tag property

  • Thread starter Thread starter Rod
  • Start date Start date
R

Rod

At design time I have entered some text into the tag property of some of my
controls.
(text boxes, labels etc)

At run time I try and read the tag (MyCntrl.Tag.ToString), but it is always
empty.

Any help very much appreciated.

thanks


Rod
 
It seems to work ok for me. Are you sure that you have added text to the Tag
property? Is it being persisted in the InitializeComponent method?
 
Rod said:
At design time I have entered some text into the tag property of some of
my
controls.
(text boxes, labels etc)

At run time I try and read the tag (MyCntrl.Tag.ToString), but it is
always
empty.

Works fine for me too (.NET 1.1 SP1).
 
And if you were to, let's say from a Button Click event handler, call the
following line of code it, it does not display the correct text?
MessageBox.Show(Me.txtbxBillingPhone.Tag.ToString())
 
You've led me to my mistake.
Thank you



Tim Wilson said:
And if you were to, let's say from a Button Click event handler, call the
following line of code it, it does not display the correct text?
MessageBox.Show(Me.txtbxBillingPhone.Tag.ToString())

--
Tim Wilson
.Net Compact Framework MVP

some
 
Back
Top