|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
"Protect" or Disable Editing of A WebcontrolI 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 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 > AFIK, there ain't no such method/Property. Wish there were. Or are you
suggesting something else? Thanks. 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. 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. > 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 > > > > > 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 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 > >
ViewState properties and mapped properties don't work well togethe
cache and detailsview, all data controls problem How do I create a custom webcontrol that can have xml inside it's tag? Custom TreeNode for asp.net 2.0 treeview control Menu Control - Templates What is the code for file upload? Multiple onclick Events 2.0 DatagridView and Buttons Calendar control to display image on Mondays SelectedIndexChanged not firing |
|||||||||||||||||||||||