in razor view 5 using mvc 5.2
@Html.IsSelected
is not recognized and produces a compilation Error while in another project in runtime it is used and works just fin any idea how to fix it ?
in razor view 5 using mvc 5.2
@Html.IsSelected
is not recognized and produces a compilation Error while in another project in runtime it is used and works just fin any idea how to fix it ?
Make sure that "IsSelected" is part of the default Razor syntax and not an extension method in one of your other projects.
You can do a Shift + Ctrl + F to do a global search on the project that "IsSelected" works in and look for "IsSelected(this HtmlHelper html". If you find this in a file somewhere, you have identified "IsSelected" as an extension that you/someone has created in the past.
Here is an another StackOverflow question that has the "IsSelected" extension method as an answer that you can reference in case you can't find it in your old project.