accessing Hyperlink Server Control within Repeater HeaderTemplate
<p>How to access the  'HyperlinkID1' control with the headertemplate?
I like to change the value like below but i can't access the control because it keep telling that "The name 'HyperlinkID1' does not exist in the current context"</p>

<pre><code>if (!IsPostBack)
{
     HyperlinkID1.ImageUrl = "asc.jpg";//change image
}
else
{
     HyperlinkID1.ImageUrl = "asc.jpg";//change image
}

    &lt;%@ Page Language="C#" %&gt;

    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
    &lt;head runat="server"&gt;
        &lt;title&gt;&lt;/title&gt;
    &lt;/head&gt;
    &lt;script language="C#" runat="server"&gt;
        public class PositionData
        {
            private string name;
            private string ticker;
            public PositionData(string name, string ticker)
            {
                this.name = name;
                this.ticker = ticker;
            }
            public string Name
            {
                get
                {
                    return name;
                }
            }
            public string Ticker
            {
                get
                {
                    return ticker;
                }
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                HyperlinkID1.ImageUrl = "asc.jpg";//change image

            }
            else
            {
                HyperlinkID1.ImageUrl = "asc.jpg";//change image
            }


            if (!IsPostBack)
            {
                ArrayList values = new ArrayList();

                values.Add(new PositionData("Microsoft", "Msft"));
                values.Add(new PositionData("Intel", "Intc"));
                values.Add(new PositionData("Dell", "Dell"));

                Repeater1.DataSource = values;
                Repeater1.DataBind();


            }
        }
    &lt;/script&gt;
    &lt;body&gt;
        &lt;form runat="server"&gt;
        &lt;b&gt;Repeater1:&lt;/b&gt;
        &lt;asp:Repeater ID="Repeater1" runat="server"&gt;
            &lt;HeaderTemplate&gt;
                &lt;table border="1"&gt;
                    &lt;tr&gt;
                        &lt;td&gt;&lt;b&gt;Company&lt;/b&gt;
                            &lt;asp:HyperLink ID="HyperlinkID1" runat="server" ImageUrl="desc.jpg" NavigateUrl="nextpage.aspx"&gt;HyperLink&lt;/asp:HyperLink&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;b&gt;Symbol&lt;/b&gt;&lt;/td&gt;
                    &lt;/tr&gt;
            &lt;/HeaderTemplate&gt;
            &lt;ItemTemplate&gt;
                &lt;tr&gt;
                    &lt;td&gt;&lt;%# DataBinder.Eval(Container.DataItem, "Name") %&gt; &lt;/td&gt;
                    &lt;td&gt;&lt;%# DataBinder.Eval(Container.DataItem, "Ticker") %&gt; &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/ItemTemplate&gt;
            &lt;FooterTemplate&gt;
                &lt;/table&gt;
            &lt;/FooterTemplate&gt;
        &lt;/asp:Repeater&gt;
        &lt;/form&gt;
    &lt;/body&gt;
    &lt;/html&gt;
</code></pre>
