views:

35

answers:

1

Hi, I want to do the following in my page_load:

if (condition)
ChangePasswordControl.InstructionText = "......";

However, I am using a ChangePasswordTemplate which when generated doesn't include an <asp:Literal ID="InstructionText runat="server" /> or similar.

Can anyone suggest how to conditionally include instructions in the template in this context?

Thanks, Chris

+1  A: 

Hi,

Could you not manually add a literal control into the template? You should then be able to access it by doing something like this:

  Literal iText = ChangePassword1.ChangePasswordTemplateContainer.FindControl("myInstructionText") as Literal;
iText.Text = "This is my error message";
keyboardP