Hello guys
i am developing MVC application, I want to call a action (with 2 parameter) when i click on some button and on the event handler of the button i do the following :
var url = '<%: Url.Action("SomeAction", "SomeConroller") %>'
$(location).attr('href', url, new { param1 : value1 , param2: value2 });
but this not working .. how can i pass parameters in this case ???
any help ???
You want to pass in your two parameters with the Url.Action method:
Sorry, realised the parameter values may not be accessible in the method. You could add placeholders and replace them afterwards: