HTML.ActionLink method

前端 未结 10 1443
刺人心
刺人心 2020-11-22 11:07

Let\'s say I have a class

public class ItemController:Controller
{
    public ActionResult Login(int id)
    {
        return View(\"Hi\", id);
    }
}
         


        
10条回答
  •  悲哀的现实
    2020-11-22 11:42

    what about this

    <%=Html.ActionLink("Get Involved", 
                       "Show", 
                       "Home", 
                       new 
                           { 
                               id = "GetInvolved" 
                           }, 
                       new { 
                               @class = "menuitem", 
                               id = "menu_getinvolved" 
                           }
                       )%>
    

提交回复
热议问题