"Protect" or Disable Editing of A Webcontrol

R

Randy

I hope somebody can make a hero out of me before tomorrow! Let's say I
have a web page with a couple of textboxes, checkboxes, radio buttons,
etc. User fills in some data, clicks submit, and off it goes. Tomorrow,
someone else retrieves that page with the data. I want the second user
to see what looks like the same page, with the data now filled in, but
with the data fields locked so that they can't be edited. I remember
the old VB 6 Windows Form controls enable property would enable
editing. The enable property on a web control, however, has a whole
'nuther use. I already have a control that allows me to identify the
specific controls I want to lock (and later unlock under certain
circumstances), but I have no clue how to actually do the locking.
Can somebody offer a hint?
Any thoughts would be greatly appreciated.
Randy
 
R

Randy

AFIK, there ain't no such method/Property. Wish there were. Or are you
suggesting something else?
Thanks.
Randy
 
R

Randy

Oops. OK, well there's such a thing for a TextBox but I need to do the
same thing for checkboxes, radiobuttons, even dropdown lists and
listboxes. I think I can create a style sheet property that makes the
various controls LOOK like they aren't editable, but I need them to be
actually protected, read only, what have you.
 
G

Guest

Try setting "Readonly=True" for text boxes and "Enabled=False" for the other
controls.
 
G

Gabriel Magaña

It'd be a little ugly, but you can use javascript, or you can use a bitmap
instead of, say, a true checkbox... I've seen it done both ways, and each
has drawbacks...
 
R

Randy

Do you remember the Strawman from the Wizard of Oz? That's what I feel
like right now... "If I only had a brain."
10 minutes ago, I would have swon by anything you like that the Enabled
property had to do with whether a control's value was recorded in the
ViewState array. I don't know where I get these crazy ideas.
Thank you for setting me straight.
RAndy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top