Question

@Ajax.ActionLink("&nbsp","Delete", "FinancialIntermediary", 
                 new { id = item.FinancialIntermediaryID }, 
                 new AjaxOptions { HttpMethod = "GET", 
                                   OnSuccess = "DeleteSuccessFI", 
                                   Confirm = "are you sure to perform the deletion." },
                 new { @class="classname" })  

css file is

.classname
 {
    background-image:url('../../Images/delete.png');
 }

I used above code for setting the background image for delete.

By doing like this I can't avoid the text.It comes like this enter image description here

I want only image on that place.Please help

Was it helpful?

Solution

Instead of using   just use a space:

@Ajax.ActionLink(" ","Delete", "FinancialIntermediary", new { id = item.FinancialIntermediaryID }, new AjaxOptions { HttpMethod = "GET", OnSuccess = "DeleteSuccessFI", Confirm = "are you sure to perform the deletion." },new { @class="classname" })  

You'd also need to make some space for your element so the background-image can be shown:

.classname
        {
            background-image:url('../../Images/delete.png');
            display: inline-block;
            width: 20px; /* adjust as necessary */
            height: 10px;/* adjust as necessary */ 
        }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top