0
我有這個代碼om我的視圖。這是很好的工作。Url.Action to Html.Raw
... onclick="location.href = '@Url.Action("Plan", "Care", new {Area = "HomeC"})'"><img src="~/Content/images/dash/Care.PNG"
如何用Html.Raw做同樣的代碼? 我試過這個
grid.Column(columnName: "Name", header: "", format: @<text>@(item.ListStatus == 1 ? Html.Raw("<button class='btn btn-default btn-plan' title='Care' onclick='location.href = " + "'" + Url.Action("Plan", "Care", new {Area = "HomeC"}) + "''>" +
"<img src='/Content/images/dash/Care.PNG' class='img-plan' data-interlocutorid=" + item.UserId + " " + "data-interlocutorname=" + item.Name + " " + ">" +
"</button>") : Html.Raw(""))
</text>),
隨着形象都很好,但鏈接不起作用。
你想做什麼? – Shyju
我編輯我的代碼。請看。 –