开发者

why it fail directing to a htm page from cshtml?

开发者 https://www.devze.com 2023-03-31 12:06 出处:网络
I want to direct to a htm page from the cshtml page, the 开发者_如何转开发code whitch i wrote in the cshtml page like this:

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

精彩评论

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

关注公众号