Locking an ASP Control

G

Greg

I need to lock my ASP controls so that a user cannot make any changes. I've
tried the Enabled=False property, but this dims how the text looks. I don't
want to disable the control, I just want it locked. How can I lock a control
so that the user cannot change it's value until I allow them. In a Windows VB
application I would use the .Locked property, but I don't see this for the
asp:TextBox control.

Greg
 
J

Jon Skeet [C# MVP]

Greg said:
I need to lock my ASP controls so that a user cannot make any changes. I've
tried the Enabled=False property, but this dims how the text looks. I don't
want to disable the control, I just want it locked. How can I lock a control
so that the user cannot change it's value until I allow them. In a Windows VB
application I would use the .Locked property, but I don't see this for the
asp:TextBox control.

I'm not really an ASP.NET developer, but... set the ReadOnly property
to true?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top