ASP.NET Core SelectList not found in one controller

217 Views Asked by At

I'm developing an ASP.NET Core 6 MVC app. My IDE is VS Code and I am using Windows 10.

The SelectList can work in one controller but not be found in other controller.

Both controllers are using Microsoft.AspNetCore.Mvc and Microsoft.EntityFrameworkCore.

How strange it is... could anyone give me a hand?

1

There are 1 best solutions below

0
Serge On

for SelectList of net core you have to use

using Microsoft.AspNetCore.Mvc.Rendering;