2010 .net mvc架构 form里面的 action 找不到文件(找不到控制器) 请大神帮忙看看

这里是路由器的设置

    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
                                            defaults: new { controller = "denglu", action = "Index", id                         = UrlParameter.Optional }
        );
    }

这里是控制器的代码

namespace diyige.Controllers
{
    public class dengluController : Controller
    {
        //
        // GET: /denglu/

        public ActionResult Index()
        {
            return View("denglu");
        }
        public ActionResult denglu() {
            string ssss = "asdasd";
            //获取页面的数据
            SysAdmin objAdmin = new SysAdmin()
            {
                LoginId = Convert.ToInt32(Request.Params["loginid"]),
                LoginPwd = Request.Params["loginPwd"].ToString()

            };
            //调用业务逻辑层
            objAdmin = new SysAdminManger().AdminLogin(objAdmin);
            if (objAdmin != null)
            {
                ViewData["info"] = "欢迎您:" + objAdmin.LoginId;

            }
            return View();


        }
    }
}
# 这里是视图的代码
<body>
    <div>
        <form action="/denglu/denglu" method="post" >
           用户名:<input type="text" name="loginid" />
           密码:<input type="text" name="loginPwd" />
           <input type="button" value="登录" />
        </form>
        <%=ViewData["info"] %>
    </div>
</body>

图片说明

程序在运行的时候 不执行这里面的代码

视图的代码放在Views下的denglu下的denglu.aspx了么

还有,你是post上去的,前面应该加上
[HttpPost]

注意你denglu()这个方法返回类型,如果是View(),就要有对应的视图存在。

图片说明 谢谢一楼和二楼的回答, 但问题应该不是出在这两个方面,