Looping to find LoginView controls
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all, I've been having trouble trying to figure out a way to loop through controls in a User Control to find LoginViews and when found manipulate each of them. With the following code snippet the LoginView controls are found but cannot be manipulated. Code: For Each lv as Control In Me.Controls If lv.GetType().ToString().Equals("System.Web.UI.WebControls.LoginView") Then CType(lv, System.Web.UI.WebControls.LoginView).RoleGroups(0).Roles = "role" End If Next Thanks in advance.