Solved

Make textbox "not selectable"

Posted on 2011-09-19
4
1,261 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:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 70

Accepted Solution

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

Expert Comment

by:BlueYonder
ID: 36563291
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:Tom Knowlton
ID: 36563294
If I do that, do I still need to bother with ReadOnly?
0
 
LVL 9

Assisted Solution

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

617 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