I am having the following piece of code that is not working:
edit
where I have
If you want to call a method e.g. @Url.Action("test") for an action link, then you have to use it like:
test
Otherwise korchev's solution is right.