0

I'm using the following text box which having a value inside of it but it is disabled. the problem is that this textbox have value inside which I want to allow that the user can copy the value from it,the problem is currently that I cannot put the curser on it... any idea how to solve it?i've tried also with read only and having same issue...

<td class="display-field">
<b>@Html.TextBoxFor(model => model.EString, new { @style = "width: 100px;", placeholder = "Click", @disabled = true })</b>                            
 </td>
Jean Tehhe
  • 1,247
  • 5
  • 19
  • 38
  • Take a look here http://stackoverflow.com/questions/8876928/allow-copy-paste-in-a-disabled-input-text-box-in-firefox-browsers – Alex Char Jun 10 '14 at 08:13

3 Answers3

1

use cursor:pointer; in inline style and readonly="true" check this

<input  style = "width:100px;cursor:pointer;"  readonly ="true" value="hellohellohell"/> 
Mr7-itsurdeveloper
  • 1,631
  • 2
  • 17
  • 24
0

readonly not working?

<td class="display-field">
    <b>@Html.TextBoxFor(model => model.EString, new { @style = "width: 100px;",  placeholder = "Click", @readonly = "readonly" })</b>
</td>
Yuliam Chandra
  • 14,494
  • 12
  • 52
  • 67
0

readonly="readonly" will let you copy the text from textbox and won't let you edit text.

Md Nazmoon Noor
  • 3,187
  • 1
  • 24
  • 30