I am calling a controller method using Url.action
like,
location.href = '@Url.Action("Display", "Customer", new { username = "abc",name = "abcdef",country = "India",email = "[email protected]",phone = "9456974545"})';
My controller method is,
public void Display(string username, string name, string country, string email, string phone)
{ }
In this method, I can get only the value of first parameter (username
). Its not getting other parameter values that is passed. All other values are null.
Please suggest me, whats wrong?
@Html.Raw(@Url.Action("Display","Customer", new { username = "abc",name = "abcdef"}))
– Mccartan