Home All Groups Group Topic Archive Search About

"Protect" or Disable Editing of A Webcontrol

Author
19 Jan 2006 1:28 AM
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

Author
19 Jan 2006 1:44 AM
Gabriel Magaña
myTextField.ReadOnly = true;

??

Show quoteHide quote
"Randy" <randolph.chris***@bms.com> wrote in message
news:1137634127.684618.118780@g47g2000cwa.googlegroups.com...
>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
>
Author
19 Jan 2006 5:16 AM
Randy
AFIK, there ain't no such method/Property. Wish there were. Or are you
suggesting something else?
Thanks.
Randy
Author
19 Jan 2006 5:34 AM
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.
Author
19 Jan 2006 7:36 PM
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...

Show quoteHide quote
"Randy" <randolph.chris***@bms.com> wrote in message
news:1137648864.459918.312960@g14g2000cwa.googlegroups.com...
> 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.
>
Author
19 Jan 2006 3:18 PM
Doug Salomon
Try setting "Readonly=True" for text boxes and "Enabled=False"  for the other
controls.

Show quoteHide quote
"Gabriel Magaña" wrote:

> myTextField.ReadOnly = true;
>
> ??
>
> "Randy" <randolph.chris***@bms.com> wrote in message
> news:1137634127.684618.118780@g47g2000cwa.googlegroups.com...
> >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
> >
>
>
>
Author
19 Jan 2006 9:06 PM
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
Author
19 Jan 2006 9:15 PM
Doug Salomon
My Pleasure.


Show quoteHide quote
"Randy" wrote:

> 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
>
>