我正在尝试用包含图标的类替换此处的链接文本:
@Html.ActionLink("Edit",
"EditSatelliteMeeting",
"ByLaws",
new { id = meeting.BLClubSatelliteMeetingId,
ByLawsId = Model.ByLawsId },
new { @class = "js-openDialog",
data_dialog_id = "AddSatelliteMeetingDialog",
data_dialog_title = "Edit Satellite Meeting" })
我知道要做到这一点,一个常见的解决方案是使用@Url.Action
.
但是当我尝试这样做时,我得到一个解析器错误。
这打破了
<a href="@Url.Action("EditSatelliteMeeting", "ByLaws",
new { id = meeting.BLClubSatelliteMeetingId,
ByLawsId = Model.ByLawsId },
new { @class = "js-openDialog icon edit",
data_dialog_id = "AddSatelliteMeetingDialog",
data_dialog_title = "Edit Satellite Meeting" })"></a>
这也是
<a href="@Url.Action("EditSatelliteMeeting", "ByLaws",
new { id = meeting.BLClubSatelliteMeetingId,
ByLawsId = Model.ByLawsId,
@class = "js-openDialog icon edit",
data_dialog_id = "AddSatelliteMeetingDialog",
data_dialog_title = "Edit Satellite Meeting" })"></a>