View Single Post
  #2 (permalink)  
Old July 24th, 2008, 11:08 AM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I think this is a problem with using the content templates. Technically, you could have the same instance of a control with the same ID in two different content templates. This is a case of the difficulties caused by "naming containers". The label control in question is buried inside a active template based on the state of the control so you need to go and find it.

Try doing something like this (my VB.NET may not be exactly correct, I've been using C# for the last several years):

Dim ctlGreeting As Label = CType(UpLoginView.FindControl("Greeting"), Label)
ctlGreeting.Text = ...

-Peter
compiledthoughts.com