Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Razor page - link creation

$
0
0

Can someone explain this?

this (tag helpers) works as I'd expect (where by there appears to be the requirement to put the full "Pages/folder/folder/pagename" and no "relative" paths can be used)

<a asp-page="./Users/Detail" asp-route-id="@m.Id">@m.Id</a>

this doesn't

@Html.ActionLink(m.Id, ["?action?","?controller?","?area?",] new { id = m.Id})

I can't figure out any permutation of .ActionLink that gets the route generated correctly... anyone care to enlighten me on how "Pages" actually works with routing?

(Aside: The doco and tutorials (mostly on MSDN) are basic but don't have much "real world" complexity... I cannot find a lot of useful info on razor pages and url/routing/parameters/templates... its quite frustrating... perhaps I'm just not searching properly... or perhaps Pages is STILL "too new"? Or perhaps Pages are just for SIMPLE pages and anything more "appy" should still be in MVC proper...?)


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>