调整控制器
This commit is contained in:
36
软件系统浏览器模版/Controllers/AccountController.cs
Normal file
36
软件系统浏览器模版/Controllers/AccountController.cs
Normal 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,9 +27,6 @@ namespace 软件系统浏览器模版.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Login()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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\" />
|
||||
|
||||
Reference in New Issue
Block a user