Dynamically adding menu items randomly disappear in ASP .net
I have a header control which is included in every page.
I create dynamic menu in Header control based on user rights and modules provided.

Menu is created in following string format.

**Code Behind**

`

    string dynamicMenu =
    <ul>
    	<li>
    		<a href='/User/HomePage' runat='server' id='HOME'>Home</a>
    	</li>
    	<li>
    		<a href='/User/Files' runat='server' id='MyFiles'>My Files</a>
    	</li>
    </ul>;
    divMenu.InnerHtml = dynamicMenu;

`

**ASPX**

`<div id="divMenu" runat="server"></div>`

Problem is that, some times menu disappears and rendered menu div has only `<ul/>` tag and l
looks like

`<div id="divMenu" runat="server"> <ul/> </div>`

How can I resolve this issue.
Dynamically adding menu items randomly disappear in ASP .net
===

I have a header control which is included in every page.
I create dynamic menu in Header control based on user rights and modules provided.

Menu is created in following string format.

**Code Behind**

`

    string dynamicMenu =
    <ul>
    	<li>
    		<a href='/User/HomePage' runat='server' id='HOME'>Home</a>
    	</li>
    	<li>
    		<a href='/User/Files' runat='server' id='MyFiles'>My Files</a>
    	</li>
    </ul>;
    divMenu.InnerHtml = dynamicMenu;

`

**ASPX**

`<div id="divMenu" runat="server"></div>`

Problem is that, some times menu disappears and rendered menu div has only `<ul/>` tag and l
looks like

`<div id="divMenu" runat="server"> <ul/> </div>`

How can I resolve this issue.