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,177
  • 3
  • 18
  • 36
  • 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,611
  • 1
  • 17
  • 23
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,214
  • 12
  • 51
  • 67
0

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

Md Nazmoon Noor
  • 3,074
  • 1
  • 21
  • 30