如何从参数中获取值?我有链接:
1)http://localhost:2409/Account/Confirmation/16或
2)../Account/Confirmation/12ds-2saa-fcse
我想在控制器方法中获得“16”或“12ds-2saa-fcse”。 
我的方法
    public ActionResult Confirmation(int id)
    {
        ViewBag.Message = "ID is: " + id;
        return View();
    }
但它返回null。
路线:
    routes.MapRoute(
        name: "Default",
        url: "{controller}/{action}/{id}",
        defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
    );
我怎样才能做到这一点?
编辑!
一切正常,我不知道为什么,但重启 VS2012 有帮助.. :O
现在是另一个问题。有没有可能hash从这个链接中获得价值?/Account/Confirmation/16?hash=dasdsadasda. 下面的代码不显示哈希字符串..
    public ActionResult Confirmation(int id, string hash)
    {
        ViewBag.Message = "ID is: " + id + HttpUtility.HtmlEncode("hash");
        return View();
    }