Question

 <div id = "menu2" style ="position:absolute;right:400px; margin-top: -55px;">
        <asp:Menu ID="Menu2" runat="server" Height="16px" style="margin-left: 1125px" 
        Width="63px" Visible="False">
        <Items>
            <asp:MenuItem Text="Economics" Value="Economics" ImageUrl="~/images/dollar.png"></asp:MenuItem>
        </Items>
    </asp:Menu> </div>

The above code is located in .aspx page. In the load function in the .cs file , how can I change the visibility of this menu?

I can change the NavigationUrl via the following statement Menu1.Items[0].NavigateUrl = AfeAttachment;

but I can't seem to adjust the visibility

Was it helpful?

Solution

Paste the following the code into the method you're using to change the menu's visibile attribute:

Menu2.Visible = true;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top