Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > "Protect" or Disable Editing of A Webcontrol

Reply
Thread Tools

"Protect" or Disable Editing of A Webcontrol

 
 
Randy
Guest
Posts: n/a
 
      01-19-2006
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

 
Reply With Quote
 
 
 
 
Gabriel Magaña
Guest
Posts: n/a
 
      01-19-2006
myTextField.ReadOnly = true;

??

"Randy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.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
>



 
Reply With Quote
 
 
 
 
Randy
Guest
Posts: n/a
 
      01-19-2006
AFIK, there ain't no such method/Property. Wish there were. Or are you
suggesting something else?
Thanks.
Randy

 
Reply With Quote
 
Randy
Guest
Posts: n/a
 
      01-19-2006
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.

 
Reply With Quote
 
Doug Salomon
Guest
Posts: n/a
 
      01-19-2006
Try setting "Readonly=True" for text boxes and "Enabled=False" for the other
controls.

"Gabriel Magaña" wrote:

> myTextField.ReadOnly = true;
>
> ??
>
> "Randy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.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
> >

>
>
>

 
Reply With Quote
 
Gabriel Magaña
Guest
Posts: n/a
 
      01-19-2006

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

"Randy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.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.
>



 
Reply With Quote
 
Randy
Guest
Posts: n/a
 
      01-19-2006
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

 
Reply With Quote
 
Doug Salomon
Guest
Posts: n/a
 
      01-19-2006

My Pleasure.


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Protect" or Disable Editing of A Webcontrol Randy ASP .Net 7 01-19-2006 09:15 PM
Custom webcontrol that references another webcontrol Fabricio ASP .Net Building Controls 0 09-21-2005 02:55 AM
Trapping an Exception ocurring in a Webcontrol at the Page or parent WebControl level. ASP .Net 2 01-31-2005 06:34 PM
WebControl inside of WebControl and attaching events Kasabaarde Sumta ASP .Net Building Controls 0 12-13-2004 09:51 PM
Can a webcontrol (webcontrol.dll) have a configuration file? Luis Ramírez. ASP .Net Building Controls 2 07-06-2004 04:35 PM



Advertisments