开发者

Displaying user website link in view

Is this fine or is开发者_StackOverflow社区 there a different way?

 <a href="Http://<%=Html.Encode(Model.Website)%>"><%=Html.Encode(Model.Website??"")%></a>


Seems fine to me, although you might want to check that the website doesn't already start with "http://" as well.


You could write a custom HTML Helper to do it for you.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜