ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Read only textbox
Title:
B
I
{code}
?
I have awesome mvc textbox with value already filled. I want to make this textbox read-only. Html.Awe().TextBox("testObjectId").Value("Vehicle").CssClass("form-control") how to make it read only field ?
Save Changes
Cancel
bsave
asked at 22 Nov 2016
@Html.Awe().TextBox("tea").EditorHtmlAttributes(new Dictionary<string, string> { {"readonly","readonly"} }).Value("hi")
at 22 Nov 2016
Omu
Thanks! it worked.
at 22 Nov 2016
bsave
adding a disabled attribute with @Html.Awe().TextBox("tea").EditorHtmlAttributes(new Dictionary<string, string> { {"disabled","disabled"} }).Value("hi") doesn't give the expected result , how would that be achieved?
at 21 Aug 2018
Stephan Luis
@Stephan Luis the code you posted works for me, it renders a disabled textbox (version 5.5)
at 21 Aug 2018
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK