Отображение цвета в разделе «Выбор цвета» в ASP.NET Core ⇐ C#
-
Anonymous
Отображение цвета в разделе «Выбор цвета» в ASP.NET Core
I stored color hex in Color table. Now I want display the color when I add a product. Here my ProductController:
public IActionResult Create() { ViewData["Color"] = new SelectList(_context.Color, "IdColor", "ColorHex"); Product product = new Product(); return View(sanPham); } Here is my view when I create:
And it display this:
enter image description here
Is there any way that I can display the color with color hex in html? I have tried many ways but nothing seems to work. I really need to have this. Thanks
Источник: https://stackoverflow.com/questions/781 ... p-net-core
I stored color hex in Color table. Now I want display the color when I add a product. Here my ProductController:
public IActionResult Create() { ViewData["Color"] = new SelectList(_context.Color, "IdColor", "ColorHex"); Product product = new Product(); return View(sanPham); } Here is my view when I create:
And it display this:
enter image description here
Is there any way that I can display the color with color hex in html? I have tried many ways but nothing seems to work. I really need to have this. Thanks
Источник: https://stackoverflow.com/questions/781 ... p-net-core
Мобильная версия