In asp.net mvc, mainly in .netcore version, we have some htmlhelpers and taghelpers who help us coding our front end.
I have more affinity with pure html than taghelpers or htmlhelpers.
I'd like to know if it's wrong use some tags in pure html like <a href>, <label>, <span>
and so on even if the .netcore provides taghelpers or htmlhelpers for that
答案 0 :(得分:1)
不,使用html锚标签而不是标签帮助程序不是轻率也不是坏习惯。我见过很多带有纯HTML锚的项目,这些项目易于阅读和维护。
如果您使用的是命名路由,则HTML帮助程序可能会节省一些重构,因为您可以在路由配置中更改控制器和操作,而不必更新链接。但是,如果这对您来说没什么大不了的,那就不用担心。