I have a listview on a master page that ISN'T part of a content place holder that I want to fill in and disable if the user is already logged in. I have a label set up already which works fine. I'm just having problems accessing a Textbox by the name of "NameTextBox" in the InsertItem template of the listview.Here is the part of my codefile:Dim vCurrentUser As MembershipUser = Membership.GetUser()
If Not vCurrentUser Is Nothing Then
Dim pnl As Label = LoginView1.FindControl("Label1")
pnl.Text = Page.User.Identity.Name
Dim NameBox As TextBox = ListView1.InsertItem.FindControl("NameTextBox")
NameBox.Text = Page.User.Identity.Name
End IfI get a Object not found exception. What is the correct way to find a control inside a InsertItemTemplate and the correct Event to use?
View Complete Post