C
C#2mo ago
Pyro Cyclone

✅ ASP.NET page help (again, ik)

Recently, I asked about what I was doing wrong making /servers/{id}, and I figured that out (had to make an Index.cshtml to make it work like I wanted), now how do I put a page under the path /servers/{id}/members?
6 Replies
Suiram1
Suiram12mo ago
It seems a bit weird to me that creating a Index.cshtml was your solution in the other answer. But when {id} works for a page than {id}/members should work for the other page.
Angius
Angius2mo ago
@page "{id}/members" in Pages/Servers/Members.cshtml?
Suiram1
Suiram12mo ago
I think so. When @page „{id}“ works for /servers/{id} them this should also work.
Pyro Cyclone
Pyro CycloneOP2mo ago
Unfortunately, that makes the path /servers/members/{id}/members
Angius
Angius2mo ago
Guess you'll have to give it an absolute path, then @page "/servers/{id}/members"
Pyro Cyclone
Pyro CycloneOP2mo ago
Thanks

Did you find this page helpful?