Calling a procedure within a data repeater
I have a little reporting tool that I'm converting to use the data repeater instead of the looping logic I first wrote it in. I have all the actual data coming out correct. My problem is with the header. In the existing code I call a routine when writing the header that puts a specific image in the column depending on sort orders. You can see how I wanted to transfer this over in the code below. However, when I call the routine it says that my arrSort isn't defined. I can get this all to work if I create the header outside of the repeater and only use the repeater for the ItemTemplate, alternateItemTemplate, and footertemplate but I would like to use the repeater for the whole thing. Any suggestions?
<asp:Repeater ID="myRepeater" Runat="server">
<TD bgcolor="#000000"><IMG height="0" width="1" src="images/spacer.gif"></TD>
WriteColHeading(arrSort, "SiteName", "SITE NAME", ID)