A
Ann
I have a formview with templates. I want to hide certain labels or textboxes
according to the user's role membership. I can do this in a sub routine as
long as it's not inside a template, is it possible to do this inside a
formview template?
Some code sample that does not work: (passphrase is the name of the label)
Protected Sub passPhrase_Init(ByVal sender As Object, ByVal e As
System.EventArgs)
If (Roles.IsUserInRole("networkServices")) Then
FormView1.itemtemplate.passphrase.visible = True
Else
FormView1.itemtemplate.passphrase.visible = False
End If
End Sub
Thank you for your time.
Ann
according to the user's role membership. I can do this in a sub routine as
long as it's not inside a template, is it possible to do this inside a
formview template?
Some code sample that does not work: (passphrase is the name of the label)
Protected Sub passPhrase_Init(ByVal sender As Object, ByVal e As
System.EventArgs)
If (Roles.IsUserInRole("networkServices")) Then
FormView1.itemtemplate.passphrase.visible = True
Else
FormView1.itemtemplate.passphrase.visible = False
End If
End Sub
Thank you for your time.
Ann