Product
Store demo
Showcase
Features
Why for developers
Why for store owners
Industries
Fashion
Health & Beauty
Food & Beverage
Automotive
Industrial & Scientific
Furniture
B2B eCommerce
International
Downloads
Download nopCommerce
Marketplace
Translations
Copyright removal key
Mobile application
Web API
Support & services
Training
Documentation
Community forums
Premium support services
Request a quote
Contact us
Partners
English
English
Español
Deutsch
Russian
Français
Italiano
Português
Türkçe
简体中文
日本語
Tiếng Việt
Get started
Shopping cart
My account
Log in
Register
Home
>
Forums
>
General
>
General Support
>
How add a class to @Html.EditorFor?
How add a class to @Html.EditorFor?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
gnikitsin
Total Posts:
266
Karma:
1408
Joined:
2/12/2010
Location:
Belarus
Posted:
3 years ago
Good afternoon.
I want to add a class to @Html.EditorFor (model => model.FirstName, new {@class = 'form-control'}), but the text-box single-line class is generated. How should I be in this situation?
Thanks
msn4561
Total Posts:
38
Karma:
246
Joined:
12/20/2015
Location:
Germany
Posted:
3 years ago
Hi,
you should not use Apostrophe to declare string. Use Quotation mark instead.
@Html.EditorFor(model => model.Name,
new
{ @calss = "form-control" })
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Still have questions or need help?
.
Premium support services
.
Get dedicated support from the nopCommerce team with a guaranteed response within 24 hours.
.
Online course for developers
.
Get the practical and technical skills you need to run and customize nopCommerce websites.