我在下面有Html.Actionlink
@Html.ActionLink("Add", "UpdateNote", "Notes", new { id = 0, type = (int)THOS.Utilities.Enumerations.Enumerations.Note.RelatedApplicationType.Law, appid = ((ObjectModelLibrary.Law)ViewData["currentLaw"]).LawID, baseappid = ((ObjectModelLibrary.Law)ViewData["currentLaw"]).LawID }, null)
如何将下面的类集成到Html.Actionlink?
class="btn btn-primary"><i class="icon-edit"
我在下面试过,但是id不起作用。
@Html.ActionLink("Add", "UpdateNote", "Notes", new { id = 0, type = (int)THOS.Utilities.Enumerations.Enumerations.Note.RelatedApplicationType.Law, appid = ((ObjectModelLibrary.Law)ViewData["currentLaw"]).LawID, baseappid = ((ObjectModelLibrary.Law)ViewData["currentLaw"]).LawID }, new { @class = "btn btn-primary", @class = "icon-edit" })
任何帮助将不胜感激。
感谢。
答案 0 :(得分:0)
将所有类放在一个@class
属性中。
试试这个:
@Html.ActionLink("Add",
"UpdateNote",
"Notes",
new { id = 0, type = (int)THOS.Utilities.Enumerations.Enumerations.Note.RelatedApplicationType.Law, appid = ((ObjectModelLibrary.Law)ViewData["currentLaw"]).LawID, baseappid = ((ObjectModelLibrary.Law)ViewData["currentLaw"]).LawID }
new { @class = "btn btn-primary icon-edit"},
null)