I have an action link like this:
@html.actionlink("link", "action", "controller", new { id = item.id }
I want this link to call a jQuery function on an external page. I have tried with onclick but it always goes to the default controller action method and so does for @class.
I would like to know can I use it like this:
@html.actionlink("link text", null, null, new { id = item.id }, new { onclick = "myfunction() }
This still does not call the jQuery function, what am I doing wrong?
here is my html hyperlink
@item.ProductID.ToString()
and below is my jquery script locate in an external js file
$(document).ready({
function showdetails(id)
{
alert("you clicked me")
});