Hello all,
I have the following code, listed below, which I assume is wrong because it is not doing what I want it to.
I think it is the IsInRole part, will that command be used to say if the the user is a memeber of the role x then ....
Please point me in the right direction here please guys and girls.
Regards
If Page.User.Identity.IsAuthenticated = True And Page.User.IsInRole("RedLorryReseller") = False Then
Dim objUserInfo As UserInfo = UserController.GetCurrentUserInfo
Me.TextBoxAdminFirstName.Text = objUserInfo.FirstName
Me.TextBoxAdminLastName.Text = objUserInfo.LastName
Me.TextBoxAdminUsername.Text = objUserInfo.Username
Me.TextBoxAdminEmail.Text = objUserInfo.Email
Me.TextBoxAdminFirstName.Enabled = False
Me.TextBoxAdminLastName.Enabled = False
Me.TextBoxAdminUsername.Enabled = False
Me.TextBoxAdminEmail.Enabled = False
ElseIf Page.User.Identity.IsAuthenticated = True And Page.User.IsInRole("RedLorryReseller") = True Then
Me.TextBoxAdminFirstName.Enabled = True
Me.TextBoxAdminLastName.Enabled = True
Me.TextBoxAdminUsername.Enabled = True
Me.TextBoxAdminEmail.Enabled = True
End If