How to lock the text of the TextBox control?

  • Thread starter Thread starter Quentin Huo
  • Start date Start date
Q

Quentin Huo

Hi:

I programmingly created a TextBox control, as:

TextBox tbPublisher = new TextBox();

tbPublisher.ID="thepublisher";

tbPublisher.Text="Quentin";


I don't want others to modify the text of this control, how can I do?

I tried making it be 'readonly', by adding:

tbPublisher.ReadOnly=true;
But the text area will be empty (nothing show up in the text box).

What can I do?

Thanks

Q.
 

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

Back
Top