I am having problem with fetching the text of the selected ActionLink
I am displaying the links dynamically after fetching through database like this:
@foreach (var item in Model)
{
<li>@Html.ActionLink(item.HobbyName, "Hobbies")</li>
}
Now, how shall I fetch the text of selected Link?
I tried this:
filename = $('a').text;
alert(filename);
But does not to work. Please help me!