调整控制器

This commit is contained in:
dathlin
2017-07-21 21:21:36 +08:00
parent c97b72eb25
commit 3bb9575146
4 changed files with 39 additions and 5 deletions

View File

@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace .Controllers
{
public class AccountController : Controller
{
// GET: Account
public ActionResult Index()
{
return View();
}
// GET: LoginPage
public ActionResult Login()
{
return View();
}
//POST 用于系统的账户登录
// 为了防止“过多发布”攻击,请启用要绑定到的特定属性,有关
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Login(FormCollection fc)
{
return RedirectToAction("Index", "Home");
}
}
}

View File

@@ -27,9 +27,6 @@ namespace 软件系统浏览器模版.Controllers
return View();
}
public ActionResult Login()
{
return View();
}
}
}

View File

@@ -152,6 +152,7 @@
<Compile Include="App_Start\BundleConfig.cs" />
<Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon>
@@ -209,7 +210,7 @@
<Content Include="Views\Home\Contact.cshtml" />
<Content Include="Views\Home\Index.cshtml" />
<Content Include="Views\Shared\_LoginPartial.cshtml" />
<Content Include="Views\Home\Login.cshtml" />
<Content Include="Views\Account\Login.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />