本文介绍了如何在MVC中的html.actionlink中设置span和class的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我在mvc中设计了一个网格......网格有列和编辑更新删除链接..我需要设置图标进行编辑更新和删除链接..但我有这样的链接:



.RenderValueAs(c => Html.ActionLink(编辑,编辑,新{ MRNo = c.MRNo}));



如何为此设置图标:



我尝试过:



例如:



 <   a     href   =     class   = 添加btn btn-warning btn-sm    data-user   =  my >  <   i     class   =  fa fa-plus >  <   / i  >  <   / a  >  
解决方案

dear friends,

I have designed a grid in mvc... that grid have columns and edit update delete links.. i need to set icon for edit update and delete links.. but i have link like this:

.RenderValueAs(c =>Html.ActionLink("Edit", "Edit", new { MRNo = c.MRNo }));

how to set icon for this:

What I have tried:

For eg:

<a href="#" class="add btn btn-warning btn-sm" data-user="my"><i class="fa fa-plus"></i></a>
解决方案


这篇关于如何在MVC中的html.actionlink中设置span和class的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 13:00