Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

adding user to a role

$
0
0

Good morning All,
I am developing a application with a membership authentication, I want to be able to store in a variable the login of the user that is logged in  and based on the selection he has done assign to a specific role

This is the code I Used

Dim LoginId = User.Identity.Name
        Dim roleselected = RCBUserType.SelectedValue

        Dim Pilots As String
        Dim Realtors As String

        If roleselected = 1 Then
            Roles.AddUsersToRole(LoginId, roleselected)
        End If

but I am getting the following error: 

Error 4 Value of type 'String' cannot be converted to '1-dimensional array of String'.

Please help

Thanks...!!


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>