ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Making textBox readonly
Title:
B
I
{code}
?
I am using `@(Html.Awe().TextBoxFor(m => m.Price).Numeric().FormatFunc("utils.prefix('$')"))` I want to make this readonly or how may I disable this field ??
Save Changes
Cancel
Sam Mosaic
asked at 03 Dec 2019
Answers
B
I
{code}
?
to make it disabled you can set `.Enabled(false)` you can see this demo: https://demo.aspnetawesome.com/Disabled for readonly you can set `.ReadonlyInput()`
Save Changes
Cancel
Omu
answered at 04 Dec 2019
Thanks but I am using version 4.9 , and not getting these options.
at 04 Dec 2019
Sam Mosaic
you could use jquery $('#PriceUSD').parent().find('.awe-display').attr('disabled', 'disabled')
at 04 Dec 2019
Omu
Thanks ,... it solved my problem.
at 04 Dec 2019
Sam Mosaic
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