I have a page that has a left menu in it. This left menu is an HTML file [LeftFrame.htm] and is included in the aspx page using the following code.
<!-- #include file="LeftFrame.htm"-->
Now I need to change the file name to LeftFrameOthers.htm from C# code.
Eg:
if ( arg == 1 )
{
divMenu.InnerHTML = "<!-- #include file="LeftFrame.htm"-->";
}
else
{
divMenu.InnerHTML = "<!-- #include file="LeftFrameOthers.htm"-->";
}
But it creates an error and left menu is not loaded. Is there a way to manage this from C# code.
I don't want to use two divs for this purpose like..
<div id="divOwnLeftFrame" runat="server" style="DISPLAY: block">
<!-- #include file="LeftFrame.htm"--></div><div id="divOthersLeftFrame" runat="server" style="DISPLAY: block">
<!-- #include file="LeftProfileFrame.htm"-->
</div>
and change the display property of the divs from C# code.
I am using VS 2003