日期:2014-05-17 浏览次数:20435 次
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public ActionResult Register(RegisterModel model)
{
if (ModelState.IsValid)
{
// Attempt to register the user
try
{
WebSecurity.CreateUserAndAccount(model.Email, model.Password, new
{
UserName = model.UserName,
Question = model.Question,
Answer = model.Answer,
Telphone = model.Telphone
});
// WebSecurity.Login(model.Email, model.Password);
// return RedirectToAction("Index", "Home");
return View("这里写你另一个视图名称,该视图显示注册成功后的内容",model);
&nbs