userid and roleid

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
dooh
Posts: 30
Joined: Sun 14 Jan 2007 21:11

userid and roleid

Post by dooh » Mon 12 Feb 2007 21:06

Hi,

I have and InsertCommand and UpdateCommand associated to a tableadapter, with a ObjectDataSource, how can i pass by parameters the userid and roleid of the current logged user?

Thanks

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 13 Feb 2007 17:43

UserId can be retrieved as MembershipUser.ProviderUserKey property. As for Role Id, you can use RoleName instead, because it is unique as well.

dooh
Posts: 30
Joined: Sun 14 Jan 2007 21:11

Post by dooh » Mon 19 Feb 2007 19:39

Thanks Alexy,

So, How i now if the user is in role, from current page?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 20 Feb 2007 06:41

What do you mean by "How i now"? Please describe in detail what exactly you need.

dooh
Posts: 30
Joined: Sun 14 Jan 2007 21:11

Post by dooh » Wed 21 Feb 2007 18:54

Sorry Alexy,

How i know if the user is in the role?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 23 Feb 2007 07:47

Code: Select all

Roles.IsUserInRole(, );
Why this method doesn't suit?

Post Reply