From http://www.liuwu.net/post/aspnet-mvc-learning-5-html-actionlink.aspx
This article lists several methods of this method:
One html. actionlink ("linktext", "actionname ")
The first parameter of this overload is the text to be displayed on the link, and the second parameter is the method of the corresponding controller. The default controller is the controller of the current page. If the controller of the current page is products, then HTML. actionlink ("detail", "detail") generates <a href = "/products/detail"> all </a>
Html. actionlink ("linktext", "actionname", "controlname ")
This overload has an additional parameter than the first overload. It specifies the Controller name, such as HTML. actionlink ("detail", "detail", "Products") generates <a href = "products/detail"> all </a>
3. html. actionlik ("linktext", "actionname", routevalues)
Routevalue can pass parameters to actions, such as HTML. actionlink ("detail", "detail", new {id = 1}) generates <a href = "products/detail/1"> detail </a>, assume that the current controller is products.
4. html. actionlink ("linktext", "actionname", routevalues, htmlattributes)
Htmlattribute can be used to set <A> tag attributes, such as HTML. actionlink ("detail", "detail", new {id = 1}, new {target = "_ blank "}) <a href = "products/detail/1" target = "_ blank"> detail </a> is generated, the main requirement is that if you write new {target = "_ blank", class = "classname"}, an error is returned. Because class is a keyword, it should be written as @ class = "classname" here ".
5. html. actionlink ("linktext", "actionname", "controlname", routevalues, htmlattributes)
This overload contains all the parameter types mentioned above
6. html. actionlink ("linktext", "actionname", "controlname", "protocol", "hostname", "fragment", routevalues, htmlattributes)
This overload is rarely used. You can specify the access protocol, domain name, and anchor, such as HTML. actionlink ("liuwu", "detail", "Products", "HTTP", "www. liuwu. me "," name ", null, null) can generate <a href =" http://www.liuwu.me/Products/Detail#name "> liuwu </a>