D
Dennis
I have a basic formview with edit and new buttons. I would like to
hide the buttons if the user is not a member of certain groups. I
know the code looks like this, but I can't figure out where the code
needs to be called from because it errors if the controls don't
exist.
If Not
Roles.IsUserInRole(ConfigurationManager.AppSettings("PowerUsers"))
Then
fvwCustomer.FindControl("EditButton").Visible = False
fvwCustomer.FindControl("NewButton").Visible = False
End If
Any help is greatly appreciated.
hide the buttons if the user is not a member of certain groups. I
know the code looks like this, but I can't figure out where the code
needs to be called from because it errors if the controls don't
exist.
If Not
Roles.IsUserInRole(ConfigurationManager.AppSettings("PowerUsers"))
Then
fvwCustomer.FindControl("EditButton").Visible = False
fvwCustomer.FindControl("NewButton").Visible = False
End If
Any help is greatly appreciated.