Label control question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to use a label control that depending on the page where the control is
use sets the control into a sort of edit mode. That is, I need to use a label
that sometimes I can type text to. Can this be done? or Is there another
control I can use to accomplish this (web control or HTML)?

HS
 
I did something like this some time ago. What I did was to create a
usercontrol that wrapped both a label and textbox control. My usercontrol
had similar properties such as Text which would be used to interact with the
contents. I also had properties such as Readonly which would determine the
state.

Depending on the state of Readonly, the label or textbox would be visible.
 
How about a textarea (multi-line TextBox)?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
Can you not just use a textbox control and set it's enabled property to true
or false depending on the page it is in?
 
Setting a TextBox property to enable and/or disable and setting to
visible/not visible is not supported by all web browsers.
While your input was great and appreciated, I think I'll simply stick to
using an HTML input control and setting its property to readonly when needed.

HS
 
Spoke too soon. My great plan turned out to be a fluke. The readonly property
is not available to change at run time.
Can you please elaborate on your user control? How did it work?

HS
 
Actually, it worked. nstead of using the readonly property of the control
(for which there is not runtime counter part), I used the Disable property.
Thanks for your input, nevertheles.

HS
 
Back
Top