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

How to send a number and a string to controller without posting a form

$
0
0

I have a controller method that I only need to send a string and an int to when clicking on a link in the view. But I cant seem to send it without using a form. This is the normal way I use without a form:

<a asp-action="Search" asp-route-id="@item.Id">Sort list</a>

I would like to also send a string to this method with the value "Date". This would make me able to sort the item in the method.

Any ideas much apprechiated!


Viewing all articles
Browse latest Browse all 9386

Trending Articles



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