Locking a control in ASP.Net
-
Hi all... How does one lock a control (so that no info can be changed in lets say a dropdown box)? I want to display the info but not allow data to be changed manually?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
-
Hi all... How does one lock a control (so that no info can be changed in lets say a dropdown box)? I want to display the info but not allow data to be changed manually?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
Are you trying to do like locking the control on winform? If yes, this feature doesn't exist in webform. (AFAIK)
Support123 wrote:
I want to display the info
What kind of information you want to display? Example? I'm not so sure what you are trying to do. It is better if you tell us your scenario with the example.
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
Hi all... How does one lock a control (so that no info can be changed in lets say a dropdown box)? I want to display the info but not allow data to be changed manually?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
-
Are you trying to do like locking the control on winform? If yes, this feature doesn't exist in webform. (AFAIK)
Support123 wrote:
I want to display the info
What kind of information you want to display? Example? I'm not so sure what you are trying to do. It is better if you tell us your scenario with the example.
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
i want to make it so that the user cant enter anything but not to
Enabled = false
the control because it grays it out (i dont want that) I might be wrong (so please correct me if i am wrong i have been working with c# for a while but i have much to learn.) but isn't there a property in C# calledLocked
? So you could have something like:ControlName.Locked = True
am i mistaken when i say that this bit of code locked the control so that no user input was excepted?.... If this is true... Is this property availible in ASP.Net as well?? (might it be that this property is only availible to textboxes???) Thank you in advance."Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
-
i want to make it so that the user cant enter anything but not to
Enabled = false
the control because it grays it out (i dont want that) I might be wrong (so please correct me if i am wrong i have been working with c# for a while but i have much to learn.) but isn't there a property in C# calledLocked
? So you could have something like:ControlName.Locked = True
am i mistaken when i say that this bit of code locked the control so that no user input was excepted?.... If this is true... Is this property availible in ASP.Net as well?? (might it be that this property is only availible to textboxes???) Thank you in advance."Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
Support123 wrote:
it grays it out
I think you can change it to some other colors from CSS
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)