Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在禁用的文本框中选择文本?
如果您希望能够选择文本,请使用ReadOnly属性而不是禁用控件。
ReadOnly
使用readonly而不是禁用它。
readonly
删除该enabled=false属性,并将其添加到您的代码隐藏中:
enabled=false
YourTextBox.Attributes.Add("readonly", "readonly");