2010-09-02 50 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>