How to set visible="true" for gridview by javascript?
<p>I have usercontrol for gridview.<br/>
I have made GridView visible="false".<br/>
When i click on a button it should be displayed.<br/>
Here is my code but im getting error.<br/></p>

<pre><code>&lt;script type="text/javascript"&gt;
    function showGrid() {
        alert("calling function");
        document.getElementById("&lt;%= GridView1.ClientID%&gt;").visibility = 'visible';
    }
&lt;/script&gt;

&lt;asp:Button ID="btnView" runat="server" OnClientClick="showGrid();" BackColor="Blue" BorderStyle="None" Font-Bold="true" ForeColor="White" Text="Show Grid" /&gt;

&lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" ClientIDMode="Static" **Visible="false"**
    AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
    BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
    DataSourceID="SqlDataSource1" ForeColor="Black" GridLines="Vertical"&gt;
</code></pre>
