2010-09-02 48 views

回答

0

为什么这样呢?如何

<anotherHtmlElement><a href="#">Title</a></anotherHtmlElement> 

此外,而不是使用<strong>,你应该处理您的格式在CSS。

+0

为什么不呢?例如。 - 如果'img'标签应该用作链接,则它必须用'a'标签包围。 – 2010-09-02 18:35:53

+0

MvcHtmlString自动编码字符串。这样更安全;-) – gnome 2010-09-02 18:37:39

0

你不能,除非你介绍新的HtmlHelper扩展方法的代码。

0

为什么不使用“Url.Content”?像:

<p> 
    Xopto Text <a href="@Url.Content("~/Controller/Action")">in the Controller/Action directory</a>. 
</p>