开发者

asp.net membercontrols Instruction text property in ChangePasswordTemplate

开发者 https://www.devze.com 2022-12-24 10:09 出处:网络
I want to do the following in my page_load: 开发者_如何学编程if (condition) ChangePasswordControl.InstructionText = \"......\";

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

精彩评论

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

关注公众号