开发者

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";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜