asp.net link button not working properly
<p><strong>asp.net link button not working properly</strong></p>

<pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Ui/MasterPage_UI.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Ui_Default2" %&gt;

&lt;asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"&gt;
&lt;/asp:Content&gt;
&lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"&gt;

&lt;div class="content" runat="server"&gt;
&lt;p&gt;
I am a returning customer&lt;/p&gt;
&lt;b&gt;E-Mail Address:&lt;/b&gt;&lt;br /&gt;
    &lt;asp:TextBox name="email" runat="server" ID="email" 
    ValidationGroup="email" &gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;b&gt;Password:&lt;/b&gt;&lt;br /&gt;
    &lt;asp:TextBox  ID="pwd" runat="server" name="password" TextMode="Password"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;br /&gt;
    &lt;asp:LinkButton ID="Submit" runat="server" CssClass="button" Text="Login" onclick="Submit_Click" ValidationGroup="email" /&gt;
&lt;/div&gt;

&lt;/asp:Content&gt;
</code></pre>

<p>the dynamicly generated menu's aspx code is-->
`</p>

<pre><code>&lt;div class="categories" runat="server"&gt;
&lt;ul runat="server" id="nav"&gt;
&lt;li class="home" style="background-repeat: no-repeat; background-color: #94C23C; background-image: url(home.jpg); background-position: center;"&gt;&lt;a href="index.htm"&gt;Home&lt;/a&gt;&lt;/li&gt;
&lt;!--Dynamic menu--&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;`
</code></pre>

<p>and thye cs code is--></p>

<p>`public void bindmenu()
    {
        HtmlGenericControl li;
        HtmlAnchor link;
        HtmlGenericControl div;</p>

<pre><code>    //for main menu
    DataTable dt = new BALCate().GetCate();
    foreach (DataRow dr in dt.Rows)
    {
        int cateid = int.Parse(dr["cate_id"].ToString());
        String cate_name = dr["cate_name"].ToString();
        li = new HtmlGenericControl("li");
        link = new HtmlAnchor();
        link.InnerText = dr["cate_name"].ToString();
        link.HRef = "CateProducts.aspx?cate_id=" + cateid + "&amp;" + "catename=" + cate_name;
        li.Controls.Add(link);

        //for submenu
        DataTable subcate = new BALCate().GetSubCate(cateid);
        if (subcate.Rows.Count &gt; 0)
        {
            div = new HtmlGenericControl("div");
            div.Attributes.Add("class", "sub-menu column-1");
            HtmlGenericControl sul = new HtmlGenericControl("ul");

            foreach (DataRow sdr in subcate.Rows)
            {
                int subcateid = int.Parse(sdr["subcate_id"].ToString());
                String subcatename = sdr["subcate_name"].ToString();
                HtmlGenericControl sli = new HtmlGenericControl("li");
                HtmlAnchor slink = new HtmlAnchor();
                slink.InnerHtml = sdr["subcate_name"].ToString();
                sli.Controls.Add(slink);
                slink.HRef = "SubCateProducts.aspx?subcate_id=" + subcateid + "&amp;" + "catename=" + cate_name + "&amp;" + "subcatename=" + subcatename;
                sul.Controls.Add(sli);

                DataTable subsubcate = new BALCate().GetSubSubCate(subcateid);
                if (subsubcate.Rows.Count &gt; 0)
                {
                    HtmlGenericControl subdiv = new HtmlGenericControl("div");
                    subdiv.Attributes.Add("class", "sub-menu");
                    HtmlGenericControl ssul = new HtmlGenericControl("ul");

                    foreach (DataRow ssdr in subsubcate.Rows)
                    {
                        int subsubcateid = int.Parse(ssdr["subsubcate_id"].ToString());
                        String subsubcatename = ssdr["subsubcate_name"].ToString();
                        HtmlGenericControl ssli = new HtmlGenericControl("li");
                        HtmlAnchor sslink = new HtmlAnchor();
                        sslink.HRef = "SubSubCateProducts.aspx?subsubcate_id=" + subsubcateid + "&amp;" + "catename=" + cate_name + "&amp;" + "subcatename=" + subcatename + "&amp;" + "subsubcatename=" + subsubcatename;
                        sslink.InnerText = ssdr["subsubcate_name"].ToString();
                        ssli.Controls.Add(sslink);
                        ssul.Controls.Add(ssli);
                    }
                    subdiv.Controls.Add(ssul);
                    sli.Controls.Add(subdiv);
                }
            }
            div.Controls.Add(sul);
            li.Controls.Add(div);
        }
        nav.Controls.Add(li);
    }
}`
</code></pre>

<p>actually there is also a master page, which contains <strong>DYNAMIC MENU</strong> in which data(categories and subcategories) dynamicly loaded from the database at the time of the pageload. 
but the iissue is that <strong>whenever i clicking on the link button , the menu doesnt retrieve the data from the database and appears blank</strong> with the remaining static part of it. </p>
