关于MvcHtmlString
在razor视图中,下边代码提示出错 ,请问该怎么写
信息:错误 10 无法将类型“string”隐式转换为“System.Web.Mvc.MvcHtmlString”
MvcHtmlString cate_Parent_Link = null;
if(cate_Parent!=null)
{
cate_Parent_Link = " >" + Html.ActionLink(cate_Parent.Name, "Category", "News", new { id = cate_Parent.ID, showType = Constants.C_Party }, null);
}
------解决方案--------------------MvcHtmlString cate_Parent_Link = new MvcHtmlString(XXXXX.ToString());
------解决方案--------------------
+1