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.
N
NoirWD
@NoirWD
Posts
-
Looping to find LoginView controls -
I see dumb peopleI've fell into the same trap; but the original web application was built in ASP and I had to convert it to ASP .NET web app. plus on top of that the share holder is a jerk. Dig deep and stick through it, it'll only make you a better developer. I'm at the end of this conversion and I have learned a lot. Hang in there! -Noir