Some basic things or the whole of it, or the old Baidu is not a thing, good memory than bad writing, write it
@Html. ActionLink () Two overloads, which will be used for the rest, needless to say.
@ Html.ActionLink (" Delete link ", "MyHome", "Home", new {},new {id= "myID", @class = "MyClass", onclick = "return confirm (\" Are you sure you want to delete it?) \")"})
//Generate the results as follows, if the reference should also be transmitted as above the first new
<a class= "MyClass" id= "myID" onclick= "return confirm (" Are you sure you want to delete it?) ")" href= "/home/myhome" > Delete link </a>
//This new is a pass-through parameter, and the second new one is HTML attribute
@Html. ActionLink (" Delete link", "MyHome", "Home", new {id= "123", Name= "Zhang San"},new {id= "myID", @class = "MyClass" , onclick= "return confirm (\" Are you sure you want to delete it?) \")"})
//Results below, the first new is the passed argument, the second is the HTML attribute
<a class= "MyClass" id= "myID" onclick= "return confirm (" Are you sure you want to delete it?) ")" href= "/home/myhome/123?name=%e5%bc%a0%e4%b8%89" > Delete link </a>
@Html. ActionLink (" Delete link", "MyHome", "Home")