I want to show my data in div from database without reloading the page. How I can do this?
<p>I am using a div tag as a container of data, a list of links are present on the page when the user clicks a link I want to show its related data from database in that div, that div will appear on link click on top of page. 
I am using asp.net C#
In detail presently i am showing data in diff-2 div tags on link clicks and all by using     </p>

<pre><code>    divid.InnerHtml="";
</code></pre>

<p>in code behind but now i want to use single single div that will appear on click of link and I want to load contents from database to be loaded in that div corresponding to the link clicked.</p>

<pre><code>        &lt;div id="popUpDiv"  runat="server"
        style="
            display:none;
            position:fixed;
            top:20%;
            left:20%;
            right:20%;
            min-width:60%;
            min-height:60%;
            background-color:Gray;
    z-index: 10002;"&gt;
         My popup box
         &lt;/div&gt;
</code></pre>

<p>this is the the button which presently shows div</p>

<pre><code>&lt;asp:Button ID="btnPopUp" OnClientClick="togglePopUp('popUpDiv'); return false;"
             text="Pop Up a div box" runat="server" /&gt;
</code></pre>

<p>this is C# code</p>

<pre><code>while (dr.Read())
            {
                sr = sr + "&lt;table border=\"0px\" &gt;&lt;tr valign=\"top\"&gt;&lt;td align=\"left\" valign=\"top\"&gt;&lt;a href=\"About.aspx\"&gt;" + dr.GetString(2) + "&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=\"left\"&gt;"+"&lt;img alt=\"\" src=\"Container/Images/aus.jpg\" /&gt;"+"&lt;/td&gt;&lt;/tr&gt;&lt;tr valign=\"top\" &gt;&lt;td style=\"text-align:Justify;\" valign=\"top\"&gt;" + dr.GetString(3) + "&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;";
            }
            con.Close();
            dr.Close();
            popUpDiv.InnerHtml = sr;
</code></pre>

<p>and this is my javascript to display div</p>

<pre><code>    &lt;script type="text/javascript" language="javascript"&gt;
    function togglePopUp(div_id) {
        var el = document.getElementById(div_id);
        if (el.style.display == 'block') { el.style.display = 'none'; }
        else { el.style.display = 'block'; }
    }
    &lt;/script&gt;
</code></pre>
