I am working with a web application in VS2010. I want to change the visibility of a Template Column based on which button is pressed on the webpage. This is what I am currently doing:
<asp:TemplateColumn >
<ItemTemplate>
<asp:LinkButton id="hlArchive" runat="server" ToolTip="ARCHIVE"
Text="A" CommandName="Archive" CausesValidation="false"
Visible="False">
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
However, this leaves a small table on the screen. Doing this gets rid of the empty table:
<asp:TemplateColumn Visible="False">
But I cannot figure out how to change the visibility in the code when the time is right since there is no ID field. Is there something similar to this that will let me do it?
hlArchive.Visible=true;