Q:

MVC ActionLink image not displayed and data not passed

I have the following ActionLink:
@if (ViewBag.Locality != null)
{
    <h4>Active Localities:</h4>
    <table class="table table-hover">
        @foreach (var loc in ViewBag.Locality)
        {
            <tr>
                <td>@loc.Locality</td>
                <td>@Html.ActionLink(" ", "RemoveActive", new { @class = "removeBtn" }, new { id = @loc.Locality })</td>
            </tr>
        }
    </table>
}

However, the class removeBtn is not being applied as below from the CSS:
a.removeBtn
{
    background:url('http://news.techgenie.com/files/symbols-delete.png') no-repeat top left;
    display: block;
    background-size: 20px;
    width: 50px;
    height: 20px;
    text-indent: -9999px;
}

Additionally, upon click the id is not being passed to the controller method, the parameter is being passed as null

A:

You are using actionlink in a wrong way,here is the demonstration of proper actionlink usage: 
Html.ActionLink(article.Title,    <--Text of actionlink 
            "Item",    <-- ActionMethod
            "Login",   <-- Controller Name.
            new { article.ArticleID },  <-- Route arguments.
            new { @class="btn" }   <-- htmlArguments.
            )   

Ans for ur question is:
@Html.ActionLink("// Title //", "RemoveActive", "//  Your controller Name //" ,new { id = @loc.Locality },new { @class = "removeBtn" })

