我有一个问题,我真的很困惑。
我的标记很简单:
@foreach (var item in Model.Items)
{
<a class="mapIconUnit" id="pinDelete-@item.PinGuid.ToString()">
@Url.Action("DeletePin") <!-- testing purposes -->
@(Ajax.ActionLink("x", "DeletePin", MapAdministrationController.Routes.DeletePin(item.PinGuid), new AjaxOptions()
{
OnSuccess = "onMapPinDeleted",
Confirm = Resources.Resource.msg_GenericDeleteConfirmationQuestion
}
))
</a>
}
现在我希望从中呈现的是:
<a class="mapIconUnit" id="...">
... rendered url
<a href="..." etc>x</a>
</a>
但我得到的是:
<a class="mapIconUnit" id="...">
... rendered url
</a>
<a href="..." etc>x</a>
我在这里做错了什么?标记太简单了,不会造成这样的事情是错误的吗?