LoggedInTemplate
-
I have a Label control inside the LoginView's LoggedInTemplate. How do I access it ? I've tried the following:- Label lbl_Role = (Label)LoginView1.FindControl("Label1"); But it returns nothing. When I checked the properties of the label in the design view its path read as:- LoginView1.LoggedInTemplate.Label1 However, the LoginView1.LoggedInTemplate property does not have a FindControl() method. Is there anyway in which I can access the Label ? Thanks
-
I have a Label control inside the LoginView's LoggedInTemplate. How do I access it ? I've tried the following:- Label lbl_Role = (Label)LoginView1.FindControl("Label1"); But it returns nothing. When I checked the properties of the label in the design view its path read as:- LoginView1.LoggedInTemplate.Label1 However, the LoginView1.LoggedInTemplate property does not have a FindControl() method. Is there anyway in which I can access the Label ? Thanks
Is the control you are looking for in active template? What this mean is that with loginview control only one template is active at any given time i.e. its either if user is not logged in or if use is logged in. Make sure the control you are looking for is within active template. \ hth