各位高手 请问下面程序中的User 是什么类型
RolePrincipal r = (RolePrincipal)User;
rolesArray = r.GetRoles();
UserRolesGrid.DataSource = rolesArray;
UserRolesGrid.DataBind();我想用下面的程序来代替
RolePrincipal r = (RolePrincipal)Membership.GetUser(UsersListBox.SelectedValue)
为什么不行呢
提示错误错误 1
无法将类型“System.Web.Security.MembershipUser”转换为“System.Web.Security.RolePrincipal” 那我该用什么类型呢?
RolePrincipal r = (RolePrincipal)User;
rolesArray = r.GetRoles();
UserRolesGrid.DataSource = rolesArray;
UserRolesGrid.DataBind();我想用下面的程序来代替
RolePrincipal r = (RolePrincipal)Membership.GetUser(UsersListBox.SelectedValue)
为什么不行呢
提示错误错误 1
无法将类型“System.Web.Security.MembershipUser”转换为“System.Web.Security.RolePrincipal” 那我该用什么类型呢?
解决方案 »
- 关于asp.net想做出jquery这种效果
- 为什么会经常出现死锁,怎么解决
- 关于ExecuteScalar()的连接...在线等...五分钟结贴...
- 初学者问一个网页效果是如何实现的
- 请求帮助,在线等,紧急!
- listbox无水平滚动条,请问如何解决
- 如何检查服务是否开启(asp.net(C#))
- mvc ef 调用带返回值的存储过程 求执导 求例子
- http:www.bbs.com/与http://bbs.com区别
- 祸不单行,ASP.NET不能连接到IIS了!
- 页面只有textbox和objectdatasource两个控件,如何将objectdatasource作为textbox的数据源取结果。
- 怎样让焦点从一个框架的文本框转移到另一个框架的文本框上?谢谢
代替
RolePrincipal r = (RolePrincipal)User;不知道user是什么类型的 我该如何转换呢?
在线等待