Routing issue with ASP.Net Core
@AspNetCore @Web
Hi dear friends, I'm working on an
Asp.Net core 6
project.
inside a Controller
called Group
I have the following ActionResult
I call this action from a view of another action called Archived, and the call syntax looks like the following
The issue:
When I clicked on Details
button in Archived view
the id
looks like the break point representation screenshot attached with this question, but it should be without those % symbols like this G6-TGI - 2020/2021
Additional info:
The coontroller
attributes I apply on it, looks like the following
Please how do I can fix this issue? and massive thanks in advance7 Replies
Thing is, nothing says if it's a GET route, a POST route, or what else
Not sure if that's the issue, but it does strike me as odd
use a query parameter instead of a route parameter for this. asp.net doesn't decode url parameters coming into the controller
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
doesn't really matter either way
or you know ... url decode it yourself?
[Route]
should only really be used on the controller to specify the base for the actions. Actions should have [Http{Method}]
attribute insteadI think by default if setting a route without
[HttpPost]
attribute it will be an HttpGet
is I'm wrong ?