You have 2 different issues here. First of all, it won't work right to make 3 optional parameters on a route. Only the last (right most) parameter can be optional. So, you need two routes to enable all of the combinations of 0, 1, 2, 3, 4, or 5 segments in the URL.
// This will match URLs 4 or 5 segments in length such as:
//
// /Home/Index/2/3
// /Home/Index/2/3/4
//
routes.MapRoute(
name: "4-5Segments",
url: "{controller}/{action}/{id}/{id2}/{id3}",
defaults: new { id3 = UrlParameter.Optional }
);
// This will match URLs 0, 1, 2, or 3 segments in length such as:
//
// /
// /Home
// /Home/Index/
// /Home/Index/2
//
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
Secondly, your ActionLink is not matching because you have specified the route value as id1, but in your route the value is id. So, you need to change ActionLink as follows.
@Html.ActionLink("my text", "myActionName", "myControllerName", new { id = 3, id2 = 7, id3 = 2}, null)
This assumes you have correctly set up your controller:
public class myControllerNameController : Controller
{
//
// GET: /myActionName/
public ActionResult myActionName(int id = 0, int id2 = 0, int id3 = 0)
{
return View();
}
}
See the working demo here.
For future reference, please provide the code as text. It is really hard to copy and edit an image, so you are much less likely to get an answer.