Just use the proper overload
of the ActionLink helper:
@Html.ActionLink(
linkText: "Link",
actionName: "Action",
controllerName: "Controller",
protocol: null,
hostName: null,
fragment: "divId",
routeValues: new { id = Id },
htmlAttributes: null
)
will generate:
<a href="/Controller/Action/123#divId">Link</a>