Làm cách nào để đặt phần tử span trong ActionLink NHƯNG KHÔNG VỚI URL.ACTION?Làm thế nào để đặt phần tử span bên trong ActionLink MVC3?
này:
<li><span>
@Ajax.ActionLink("LinkText", "ControllerName", new AjaxOptions
{
UpdateTargetId = "div",
InsertionMode = InsertionMode.Replace,
HttpMethod = "GET",
LoadingElementId = "progress"
})
</span></li>
tạo này:
<li>
<span>
<a href="/Home/ControllerName" data-ajax-update="#scroll"
data-ajax-mode="replace" data-ajax-method="GET"
data-ajax-loading="#progress" data-ajax="true">LinkText</a>
</span>
</li>
Nhưng tôi cần cái gì khác. Làm thế nào tôi có thể tạo ra một tùy chỉnh phương pháp MVC3 ActionLink mà tạo ra sản lượng này:
<li>
<a href="/Home/ControllerName" data-ajax-update="#scroll"
data-ajax-mode="replace" data-ajax-method="GET"
data-ajax-loading="#progress" data-ajax="true">
<span>LinkText</span> // this span generated inside <a>
</a>
</li>
http://stackoverflow.com/questions/3470622/wrapping-an-element-with-html-actionlink – Ali