What's the difference between RouteLink and ActionLink in ASP.NET MVC?

前端 未结 4 1080
醉话见心
醉话见心 2020-11-29 21:45

I think that the title pretty much sums it up:

What\'s the difference between RouteLink() and ActionLink() in ASP.NET MVC?

i.e. whe

4条回答
  •  情歌与酒
    2020-11-29 22:27

    RouteLink takes the name of a route, so if your route names are reliable and fairly unique then this will be the same even if the action name to be used changes. ActionLink links to a specific action of a specific controller instead. I use both in my views, depending on what kind of link I'm after!

提交回复
热议问题