There are two "mega overloads" of ActionLink that take a fragment parameter:
public static string ActionLink(this HtmlHelper htmlHelper,
string linkText, string actionName, string controllerName,
string protocol, string hostName, string fragment, object routeValues,
object htmlAttributes);
public static string ActionLink(this HtmlHelper htmlHelper,
string linkText, string actionName, string controllerName,
string protocol, string hostName, string fragment,
RouteValueDictionary routeValues, IDictionary<string, object> htmlAttributes);
See MSDN for more info on the overloads.
In your case it would be (and note the "fragment" parameter in particular):
<%= Html.ActionLink(Model[x].Title, "Index", "q",
/* protocol */ null, /* hostName */ null, /* fragment */ "1",
new { slug = Model[x].TitleSlug, id = Model[x].PostID }, null) %>
With the "mega overloads" you can leave most parameter values as null and they will get the appropriate default values.