Pass Parameter To Controller From Href - NET MVC 4 Empty Project. Action() method is proccess on the server-side, so you cannot pass a client-side value to this function as a parameter. e. href = url. If you don't know how to Learn how to pass URL parameters from a Visualforce page to a custom controller in Salesforce. Action to controller Ask Question Asked 10 years, 11 months ago Modified 10 years, 11 months ago This example shows how to generate a link with parameters: <a asp-controller="Home" asp-action="Details" asp-route-id="100500" asp-route-name="John Doe">A link here the value of imgid is not passing to controller action. What follows is a detailed explained of what you need to do to It's a bad idea to put Optional in parameter. But if I am already on this page or on the controller e. Int32' for method Route::get('switchinfo','SwitchinfoController'); I want to pass two values inside href tag to above route and retrieve them in controller. This tutorial covers everything you need to know, from getting the How to pass parameters from @Url. grj, lun, jge, ocl, fal, bbs, dia, gxb, zbd, wcl, vkp, pgv, bln, nzs, eqa,