开发者

why it fail directing to a htm page from cshtml?

I want to direct to a htm page from the cshtml page, the 开发者_如何转开发code whitch i wrote in the cshtml page like this:

     <a href = "/content/all/@Model.PageLink" taget = '_blank'> More </a>

where the value of Model.PageLink is "test.htm".

when i click the "More", it allways failed: "http error 404: Bad Request". Who can tell whats wrong about it?


Try wrapping the call into parenthesis:

<a href="/content/all/@(Model.PageLink)" taget="_blank">More</a>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜