How to Programmatically access a control that lies within a within a header template

21. September 2009

Read this article in your language IT | EN | DE | ES

How to programmatically access a control that lies within a within a wizardview header template (or any template header I would imagine) in C#


<asp:Wizard ID="wContent" runat="server" ActiveStepIndex="0">
<HeaderTemplate>
<asp:Label ID="lblHeader" runat="server" Text="Text Here" /><br />
<br />
</HeaderTemplate>
</asp:Wizard>


(instance name of the wizard).FindControl("HeaderContainer").FindControl("instance name of the control") as type of control).Text = "Hello World!";

Code Snippets, C#, Programming

Add comment


(Will show your Gravatar icon)

  Country flag

Click to change captcha
biuquote
  • Comment
  • Preview
Loading