According to @alxndr's hint, this question has the same error, and it is solved with the following code:
function changetotopicdetail(topicid, topicname) {
$('#loadingAjaxs').show();
$('#flubestext').hide();
var link = '@Url.Action("Detail", "Topics", new { @id = -1, @namespace = -2, @Forum = "all", @page = 0})';
link = link.replace("-1", topicid);
link = link.replace("-2", topicname);
$('#contentwrap').load(link, function () {
$('#loadingAjaxs').hide();
$('#flubestext').show();
window.history.pushState(null, 'title', '/topics');
});
}
, JavaScript (topicid topicname) Razor - view. , . , @Url.Action JavaScript, JavaScript ( ) joker chars -1 -2 . , , . , .