public ActionResult RepwdEdit(Guid id)
{
var db = new aspnetdbEntities();
var model = db.aspnet_Membership.Where(p => p.UserId == id).FirstOrDefault();
MembershipUser user = Membership.GetUser(model.aspnet_Users.UserName);
if (user.IsLockedOut)
{
user.UnlockUser();
}
StringBuilder strhtml = new StringBuilder();
strhtml.Append("<li>");
strhtml.Append("原始密码:<input type='password' id='oldpwd' value='" + user.UserName + "'/>");//user.ResetPassword()
strhtml.Append("输入新密码:<input type='password' id='newpwd1'/>");
strhtml.Append("请重复密码:<input type='password' id='newpwd2'/>");
strhtml.Append("<input type='button' id='btnok'/>");
strhtml.Append("</li>");
//string password = user.ResetPassword(); //修改密码
//user.ChangePassword(password, "111111"); //用指定的密码设置
//return RedirectToAction("Index");
return View(strhtml.ToString());
} <td>
<%: Html.ActionLink("角色", "Edit","UserInRoles", new { id = item.UserId,name=item.aspnet_Users.UserName , height = 560, width = 700, TB_iframe = "True", keepThis = "False" }, new { @class = "thickbox" })%>
|
<%: Html.ActionLink("解锁", "Unlock", new { id = item.UserId }, new { onclick = "return confirm('是否解锁此用户?')" })%>
|
<%: Html.ActionLink("密码修改", "RepwdEdit", new { id = item.UserId , height = 560, width = 700, TB_iframe = "True", keepThis = "False" }, new { @class = "thickbox" })%>
</td>
解决方案 »
- gridview如何选中行后如何让滚动条保持不动
- datatable问题???
- <%#Container.ItemIndex %> 当做参数的问题
- jquery取控件位置
- asp.net 服务器textbox控件 如何失去焦点触发某个事件
- ASP.NET 2003 如何移除打开.net时的起始页中显示的项目??
- SQL SB中表的字段已设置为非空,为何可以添加此字段为空的一条记录???
- 帮我看一下
- 请问怎么实现asp.net中只打印web窗体中的某一个table中的内容,并且保持table内格式不变?
- 请问web.config是用什么编写的
- asp.net 中我想编辑dropdownlist选中值,可是SelectedValue总是ID值,怎么回事?
- 求有用过的开源cms
是不是你这里有问题,里面的符号
>= ?? >=
return View();
或者:
Response.Write(strhtml.tostring());
Response.End();
return View();
它把strhtml.ToString()当成是url路径了,当然会报错了