vb6 menu editor equivalent

M

Mel

What control do I use for a menu on a web page? How do I add a check
box to an menu item? I have a menu called Chart and beneath it I have
a menu item called Publish. I want to display a checked check box
when Publish is selected and an unchecked box when it's selected
again. Can anyone point me in the right direction?

(using asp.net 2.0, vb.net 2005)
 
M

Mel

Sorry, but I don't understand what the problem is.. If you want only one of
the menus to show a checkbox, then apply the checkbox style to only one of
them...

How? This is my code, and it shows a check box beneath both menus
next to every menu item.

<asp:Menu ID="mnuMain" runat="server" Orientation="Horizontal"
BackColor="#B5C7DE" DynamicHorizontalOffset="2" Font-Names="Verdana"
Font-Size="0.8em" ForeColor="#284E98" Height="24px"
StaticSubMenuIndent="10px" DynamicEnableDefaultPopOutImage="False"
StaticEnableDefaultPopOutImage="False">
<Items>
<asp:MenuItem Text="Job" Value="Job"
Selectable="False">
<asp:MenuItem ImageUrl="~/images/menu/copy.bmp"
Text="Copy" Value="Copy" ToolTip="Copy Current Job">
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/menu/new.bmp"
Text="New" Value="New" ToolTip="Create New Job">
</asp:MenuItem>
<asp:MenuItem ImageUrl="~/images/menu/open.bmp"
Text="Open" Value="Open" ToolTip="Open Existing Job">
</asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="Chart" Value="Chart"
Selectable="False">
<asp:MenuItem Text="Preview" Value="Preview"
ToolTip="Only Internal Employees Can View Chart On Internet"></
asp:MenuItem>

<asp:MenuItem Text="Publish" Value="Publish"
ToolTip="Enables All Users to View Chart On Internet"></asp:MenuItem>
</asp:MenuItem>
</Items>
<StaticSelectedStyle BackColor="#507CD1" />
<StaticMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#284E98" ForeColor="White" / <DynamicMenuStyle BackColor="#B5C7DE" />
<DynamicSelectedStyle BackColor="#507CD1" />
<DynamicMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
<StaticHoverStyle BackColor="#284E98" ForeColor="White" />
<StaticMenuStyle HorizontalPadding="5px" />
<DynamicItemTemplate>
<%# Eval("Text") %>
&nbsp;<asp:CheckBox ID="chkPreview" runat="server" />
</DynamicItemTemplate>
<StaticItemTemplate>
<%# Eval("Text") %>
</StaticItemTemplate>
</asp:Menu>
 
M

Mel

How?  This is my code, and it shows a check box beneath both menus
next to every menu item.

        <asp:Menu ID="mnuMain" runat="server" Orientation="Horizontal"
BackColor="#B5C7DE" DynamicHorizontalOffset="2" Font-Names="Verdana"
Font-Size="0.8em" ForeColor="#284E98" Height="24px"
StaticSubMenuIndent="10px" DynamicEnableDefaultPopOutImage="False"
StaticEnableDefaultPopOutImage="False">
            <Items>
                <asp:MenuItem Text="Job" Value="Job"
Selectable="False">
                    <asp:MenuItem ImageUrl="~/images/menu/copy.bmp"
Text="Copy" Value="Copy" ToolTip="Copy Current Job">
                    </asp:MenuItem>
                    <asp:MenuItem ImageUrl="~/images/menu/new.bmp"
Text="New" Value="New" ToolTip="Create New Job">
                    </asp:MenuItem>
                    <asp:MenuItem ImageUrl="~/images/menu/open.bmp"
Text="Open" Value="Open" ToolTip="Open Existing Job">
                    </asp:MenuItem>
                </asp:MenuItem>
                <asp:MenuItem Text="Chart" Value="Chart"
Selectable="False">
                    <asp:MenuItem Text="Preview" Value="Preview"
ToolTip="Only Internal Employees Can View Chart On Internet"></
asp:MenuItem>

                    <asp:MenuItem Text="Publish" Value="Publish"
ToolTip="Enables All Users to View Chart On Internet"></asp:MenuItem>
                </asp:MenuItem>
            </Items>
            <StaticSelectedStyle BackColor="#507CD1" />
            <StaticMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
            <DynamicHoverStyle BackColor="#284E98" ForeColor="White" /

            <DynamicMenuStyle BackColor="#B5C7DE" />
            <DynamicSelectedStyle BackColor="#507CD1" />
            <DynamicMenuItemStyle HorizontalPadding="5px"
VerticalPadding="2px" />
            <StaticHoverStyle BackColor="#284E98" ForeColor="White" />
            <StaticMenuStyle HorizontalPadding="5px" />
            <DynamicItemTemplate>
                <%# Eval("Text") %>
                &nbsp;<asp:CheckBox ID="chkPreview" runat="server" />
            </DynamicItemTemplate>
            <StaticItemTemplate>
                <%# Eval("Text") %>
            </StaticItemTemplate>
        </asp:Menu>- Hide quoted text -

- Show quoted text -

I have just one menu control. It has two menus in it called "Job" and
"Chart". Beneath the "Chart" menu I only want to display a checkbox
next to the "Preview" menu item.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top