MVC: Is that possible to Ajax.ActionLink with an i

2019-08-17 01:10发布

问题:

I have created the following button based on Ajax.ActionLink logic:

@Ajax.ActionLink("View Details", "Method", "Controller",
new AjaxOptions { OnBegin = "showProgress", OnComplete = "showImage", OnFailure = "ReportError" },
new { @class = "modal-link k-button btn-icon-sm btn-view-detail k-icon k-i-file-txt", style = "width: 150px; height:70px;" })

That produces the following image with the Action Description and Action Image underneath:

This is the html that represents the button:

<a title="View Details" class="modal-link k-button btn-icon-sm btn-view-detail k-icon k-i-file-txt" style="width: 150px; height: 100px;" href="/Controller/GetData?Length=9" data-toggle="modal" data-target="#modal-container" data-ajax-failure="CheckError" data-ajax-complete="showLoaderPopup" data-ajax-begin="showLoader" data-ajax="true">View Details</a>

How can I modify it, so I the button will have Action Image followed by Action Description on the right hand side of the image. It has to be one button>

Is there any template for Ajax.ActionLink that I can use to display what I need?