var boxIdValue = 233;
var result = title + '<br/>@Html.ActionLink("Detail", "Show", "Boxes", new{boxId=233}, null)';
When I hardcode boxId
then it works. But when I write:
var result = title + '<br/>@Html.ActionLink("Detail", "Show", "Boxes", new{boxId=boxIdValue}, null)';
It doesn't. Is it possible to mix javascript var and razor in this way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…