MVC: Is that possible to Ajax.ActionLink with an image and the text on the right hand side with the image?

天大地大妈咪最大 提交于 2019-12-24 22:00:16

问题


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?

来源:https://stackoverflow.com/questions/51622524/mvc-is-that-possible-to-ajax-actionlink-with-an-image-and-the-text-on-the-right

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!