How to specify the view location in asp.net core mvc when using custom locations?

前端 未结 8 2140
死守一世寂寞
死守一世寂寞 2020-11-30 22:59

Let\'s say I have a controller that uses attribute based routing to handle a requested url of /admin/product like so:



        
8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 23:42

    So after digging, I think I found the issue on a different stackoverflow. I had the same issue, and upon copying in the ViewImports file from the non area section, the links started to function as anticipated.
    As seen here: Asp.Net core 2.0 MVC anchor tag helper not working
    The other solution was to copy at the view level:
    @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

提交回复
热议问题