473,408 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

"Protect" or Disable Editing of A Webcontrol

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

Jan 19 '06 #1
7 1118
myTextField.ReadOnly = true;

??

"Randy" <ra***************@bms.com> wrote in message
news:11**********************@g47g2000cwa.googlegr 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

Jan 19 '06 #2
AFIK, there ain't no such method/Property. Wish there were. Or are you
suggesting something else?
Thanks.
Randy

Jan 19 '06 #3
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.

Jan 19 '06 #4
Try setting "Readonly=True" for text boxes and "Enabled=False" for the other
controls.

"Gabriel Magaña" wrote:
myTextField.ReadOnly = true;

??

"Randy" <ra***************@bms.com> wrote in message
news:11**********************@g47g2000cwa.googlegr 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


Jan 19 '06 #5

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" <ra***************@bms.com> wrote in message
news:11**********************@g14g2000cwa.googlegr 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.

Jan 19 '06 #6
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

Jan 19 '06 #7

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

Jan 19 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: StevePBurgess | last post by:
I would like to make my downloads section unbrowsable (to users) but accessible to scripts. Can I deliver a file to a browser without linking to it's URL so that I can deliver files...
6
by: Al Dykes | last post by:
I've just grabbed a PHP book and can deal with the syntax and now I need to decide to learn specific packages and features. Define "framework". What are the major framework flavors ? Under...
5
by: Andrew | last post by:
Hi, experts, My system has a problem when I invoke the fileSystemObject to create a text file (it worked ok long before.) The asp seems running, but actually never finishes. I don't know what I...
6
by: Tom Rahav | last post by:
Hi! I need to store some information about my application, such as trail version limits, allowed modules, etc. My question is whether it's better to store it in the windows registry, or in a...
1
by: McKirahan | last post by:
What is "active content"? My ASP page just returns HTML.... I have a page with an .htm extension that has a form whose action is an ASP page which generates a report after updating a database...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
3
by: gregory_may | last post by:
According to this article, I cant change "CanStop" on the fly!!! ...
94
by: Samuel R. Neff | last post by:
When is it appropriate to use "volatile" keyword? The docs simply state: " The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock...
7
by: =?Utf-8?B?cmFtbzk5NDE=?= | last post by:
Hi, Is there any way disable using "protected override void OnPaint(..." method out of the assembly. I create usercontrol and i do not want user adds extra codes OnPaint method for securtity...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.