You could pass all parameters in the routeValues argument of the ActionLink method:
@Html.ActionLink(
"go to index", // linkText
"index", // actionName
new { // routeValues
id = "123",
participant = "yes",
flagged = "no"
}
)
Assuming default routing setup this will generate:
<a href="/Home/index/123?participant=yes&flagged=yes">go to index</a>
UPDATE:
To further elaborate on the comment you have posted, if the ActionLink generated an url with Length=6 for example this means that you have used the wrong overload. For example this is wrong:
@Html.ActionLink(
"go to index", // linkText
"index", // actionName
"home", // routeValues
new { // htmlAttributes
id = "123",
participant = "yes",
flagged = "no"
}
)
It is obvious why this is wrong from the comments I've put along each parameter name. So make sure you are carefully reading the Intellisense (if you are lucky enough to have Intellisense working in Razor :-)) to pick the correct overload of the helper methods.
The correct overload in the case you want to specify a controller name is the following:
@Html.ActionLink(
"go to index", // linkText
"index", // actionName
"home", // controllerName
new { // routeValues
id = "123",
participant = "yes",
flagged = "no"
},
null // htmlAttributes
)
Notice the null that is passed as last argument. That's what corresponds to the htmlAttributes parameter.