how to get attribute from actionlink, well i have this:

<table>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.ActionLink(item.Name, "Chat", "Home", new { id = item.ID }, new { @class = "Group" })<br />
            </td>

        </tr>
    }
</table>

And on redirect page I need to get item.name

Here js:

    $('#rooms ul li').not('.nav-header').click(function (e) {
        e.preventDefault();

        $('#rooms ul li').not('.nav-header').removeClass('active');

        $(this).addClass('active');
        var roomKey = $(this).data('value');
        hub.server.joinGroup(roomKey);
    });

Related posts

Recent Viewed