Пример #1
0
 protected void setPassword_Click(object sender, EventArgs e)
 {
     if (IsValid)
     {
         var result = OpenAuth.AddLocalPassword(User.Identity.Name, password.Text);
         if (result.IsSuccessful)
         {
             Response.Redirect("~/Account/Manage?m=SetPwdSuccess");
         }
         else
         {
             newPasswordMessage.Text = result.ErrorMessage;
         }
     }
 }
 protected void setPassword_Click(object sender, EventArgs e)
 {
     if (IsValid)
     {
         var result = OpenAuth.AddLocalPassword(User.Identity.Name, password.Text);
         if (result.IsSuccessful)
         {
             //Response.Redirect("~/Account/Manage?m=SetPwdSuccess"); //for internal testing
             Response.Redirect("~/Account/Manage?m=SetPwdSuccess"); //zxp live
         }
         else
         {
             ModelState.AddModelError("NewPassword", result.ErrorMessage);
         }
     }
 }