Solved

Make textbox "not selectable"

Posted on 2011-09-19
4
1,094 Views
Last Modified: 2012-05-12
I have some code in place to make a textbox look more like a label (sort of a "read only" status, of sorts).

 tbFirstName.BorderWidth = 0;
 tbFirstName.ReadOnly = true;

But, I can still put an insertion point next to the text.

See my screencast.  Notice around time index :34 seconds, I click next tot he W and it seems to put an  insertion point next to the W  (   W  |    ) but of course you cannot change the W by typing or anything, it still looks odd.

Thank you,

Tom
knowlton-501450.flv
0
Comment
Question by:knowlton
  • 2
4 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 475 total points
Comment Utility
set the Enabled property to False
0
 
LVL 9

Expert Comment

by:BlueYonder
Comment Utility
Try the enabled tag.  Here is an example.
<asp:TextBox runat="server" ID="txtSomething" CssClass="textEntry" Enabled="false"></asp:TextBox>
0
 
LVL 5

Author Comment

by:knowlton
Comment Utility
If I do that, do I still need to bother with ReadOnly?
0
 
LVL 9

Assisted Solution

by:BlueYonder
BlueYonder earned 25 total points
Comment Utility
Readonly is not required when enabled is set to false
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now