asp.net membercontrols Instruction text property in ChangePasswordTemplate
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
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";
精彩评论