This is how I navigate to myPage.aspx
,
<a href='~/myPage.aspx?show=<%#Eval("id")%>' id="showEach" runat="server">Show Each</a>
<a href="~/myPage.aspx?show=all" id="showAll" runat="server">Show All</a>
And I have a gridview in myPage.aspx
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:BoundField HeaderText="ColumnOne" Visible="true"/>
<asp:BoundField HeaderText="ColumnTwo" Visible="true"/>
</Columns>
</asp:GridView>
What I want to do is , if Query String is equal to all
(~/myPage.aspx?show=all) , I want to set GridView1's Column2
's visible to true , else , set visible to false .
How can I do it ?