Make asp:menu expand to left - asp.net

I have asp:menu and I want it to expand to left always.
This is the menu code
<asp:Menu ID="MultiLevelMenu" DataSourceID="SiteMapDataSource1" runat="server" StaticEnableDefaultPopOutImage="False" MaximumDynamicDisplayLevels="100" orientation="Vertical" CssClass="MLMmenuV">
<StaticMenuItemStyle CssClass="MLMmvC" />
<StaticHoverStyle CssClass="MLMmvoC" />
<DynamicMenuStyle CssClass="MLMmenuVsub" />
<DynamicMenuItemStyle CssClass="MLMsubmvC" />
<DynamicHoverStyle CssClass="MLMsubmvoC" />
</asp:Menu>

The way to do that is to put the whole list inside a div and set the "dir" property to "rtl" as following:
<div dir="rtl">
//menu's code here
</div>

Related

ext:Button not showing up, even though rendered=true

so I got some quite simple markup containing a button inside a Toolbar.
The problem now is, even though the button is "correctly" written to DOM it does not show up.
See this screenshot for details:
would someone mind explaining why setting fixed heights / widths / positions does not bring the button to front and the containing markup elements all have either width=0px; or height=0px;?
Here comes a sample:
<body>
<ext:ResourceManager ID="RM" runat="server" />
<ext:Viewport Layout="BorderLayout" runat="server" ID="InnerView" OverflowY="Scroll">
<Content>
<ext:Button ID="adminswap" runat="server" Text="Admin-Ansicht umschalten" Hidden="false"
AllowDepress="true" MinHeight="16" ToFrontOnShow="true" Visible="true" Icon="ArrowSwitchBluegreen">
<%-- This Guy doesn't show up--%>
</ext:Button>
<ext:Panel runat="server" ID="order" Border="false" OverflowY="Scroll">
<LayoutConfig>
<ext:TableLayoutConfig Columns="3" />
</LayoutConfig>
<Items>
<ext:Panel runat="server" Layout="ColumnLayout" RowSpan="2" Border="false">
<Content>
<p> And here is some Grid-panel, which is of no further interest</p>
</Content>
</ext:Panel>
<ext:Panel ColSpan="2" runat="server" ID="Panel_Instructions" Title="Türöffnung per Telefon"
Width="740" Padding="10" Border="true" AutoHeight="true">
<Content>
<br />
<p>
Some Multiline text containing instructions<br>
this also is of no further interest and just for the sake of the sample<br><br> lorem Ipsum dolor sit amet and stuff...
</p>
</Content>
</ext:Panel>
<ext:Panel runat="server" Width="350" AutoHeight="false" Height="200"
StripeRows="true" TrackMouseOver="true" Border="true">
<Content>
<p>Some Content Grid-Panel</p>
</Content>
</ext:Panel>
<ext:Panel runat="server" ID="Standort_Details" Title="Adresse" Width="370" Padding="10"
AutoHeight="false" Height="200" Border="true">
<Items>
<ext:DisplayField ID="Details_field1" runat="server" FieldLabel="street"
Name="" />
<ext:DisplayField ID="Details_field2" runat="server" FieldLabel="postal code" Name="" />
<ext:DisplayField ID="Details_field3" runat="server" FieldLabel="city" Name="" />
<ext:DisplayField ID="Details_field4" runat="server" FieldLabel="phone" Name="" />
</Items>
</ext:Panel>
<ext:Panel ID="Panel_5" Border="true" Height="460" StyleSpec="vertical-align:top;" ColSpan="3" runat="server">
<Content>
<p> some content control grid-panel</p>
</Content>
</ext:Panel>
</Items>
</ext:Panel>
</Content>
</ext:Viewport>
</body>
A BorderLayout works with regions. You don't specify any regions. To get the Button visible you can just remove the Layout="BorderLayout" of the Viewport.
Here is an example of using a BorderLayout.

asp.net Menu control is not highlighting the selected item

I am trying to set the backcolor on the asp.net menu's selected item but it has no effect.
<div id="navepanel" style="float:left;">
<asp:Menu ID="Menu1" runat="server">
<StaticSelectedStyle BackColor="#D5D9F7" />
<DynamicSelectedStyle BackColor="#D5D9F7" />
<Items>
<asp:MenuItem Text="New Chapter" Value="New Chapter" NavigateUrl="~/ChapterManagement/CreateNewChapter.aspx"></asp:MenuItem>
<asp:MenuItem Text="Edit Chapter" Value="Edit Chapter" NavigateUrl ="~/ChapterManagement/EditChapter.aspx"></asp:MenuItem>
<asp:MenuItem Text="Select Chapter" Value="Select Chapter" NavigateUrl ="~/ChapterManagement/SelectChapter.aspx"></asp:MenuItem>
<asp:MenuItem Text="Add Topics" Value="Add Topics" NavigateUrl ="~/ChapterManagement/AddTopics.aspx"></asp:MenuItem>
</Items>
</asp:Menu>
I am using Chrome currently for the testing purpose. This menu control is on the master page.
Try this:
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" StaticDisplayLevels="1"
Orientation="Horizontal" DataSourceID="SiteMapDataSource1" >
<staticselectedstyle backcolor="LightBlue" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />

how to change fontcolor of asp:menu that read items from sitemap

how can i change my fontcolor of asp:menu that it read items from sitemap?
ccsClass not worked on it!
this is my code:
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"
StaticDisplayLevels="2" CssClass="MyMenu"
StaticSubMenuIndent="18px"
DynamicMenuItemStyle-BackColor="#C0C0BC"
DynamicHoverStyle-BackColor="#B3B3B3"
StaticHoverStyle-BackColor="#666666"
StaticHoverStyle-ForeColor="#d9d9d6"
StaticMenuItemStyle-VerticalPadding="1px" StaticPopOutImageUrl="~/Images/control_rewind_blue.png" >
this is ccsClass:
.MyMenu{color:White; font-family:Tahoma; font-size:medium;}
thanks
You can add color by forecolor and you can add style as well
<asp:Menu ID="Menu1" ForeColor="#003399" style="left: 40px; position: relative; top: 6px" runat="server" DataSourceID="SiteMapDataSource1"
StaticDisplayLevels="2" CssClass="MyMenu"
StaticSubMenuIndent="18px"
DynamicMenuItemStyle-BackColor="#C0C0BC"
DynamicHoverStyle-BackColor="#B3B3B3"
StaticHoverStyle-BackColor="#666666"
StaticHoverStyle-ForeColor="#d9d9d6"
StaticMenuItemStyle-VerticalPadding="1px" StaticPopOutImageUrl="~/Images/control_rewind_blue.png" >
Define a class for every operation on asp:Menu like this :
<asp:Menu ID="AspMenu" runat="server">
<StaticMenuStyle CssClass="VerticalMenuli" />
<StaticMenuItemStyle CssClass="VerticalMenuItem" />
<StaticHoverStyle CssClass="VerticalMenuHover" />
<StaticSelectedStyle CssClass="VerticalMenuSelectedItem" />
<DynamicMenuStyle CssClass="VerticalMenuSubMenu" />
<DynamicMenuItemStyle CssClass="VerticalMenuSubMenuItem" />
<DynamicHoverStyle CssClass="VerticalSubMenuHover" />
<DynamicSelectedStyle CssClass="SubMenuSelected"/>
And now you can give formatting in the defined class for any sub menu or link.

asp.net HTMLEDITOREXTENDER ajaxcontroltoolkit lower border not showing

So i have the whole thing working and set up, except that the box of the htmleditorextender has no lower border if I customize the height of the textbox. If I leave it unspecified, it displays correctly but the boxes too big to have in the page. What can I do?
This is the code I have:
<asp:TextBox
ID="TServiceDescription"
TextMode="MultiLine"
Height="150px"
BorderWidth="0"
runat="server" />
<cc1:HtmlEditorExtender ID="HtmlEditorExtender1"
TargetControlID="TServiceDescription"
runat="server" >
<Toolbar>
<ajaxToolkit:Bold />
<ajaxToolkit:Italic />
<ajaxToolkit:Underline />
<ajaxToolkit:StrikeThrough />
<ajaxToolkit:Subscript />
<ajaxToolkit:Superscript />
<ajaxToolkit:JustifyLeft />
<ajaxToolkit:JustifyCenter />
<ajaxToolkit:JustifyRight />
<ajaxToolkit:JustifyFull />
<ajaxToolkit:InsertOrderedList />
<ajaxToolkit:InsertUnorderedList />
<ajaxToolkit:CreateLink />
<ajaxToolkit:Indent />
</Toolbar>
</cc1:HtmlEditorExtender>
and thanks in advance
You can define Rows for the TextBox control. as
ID="TServiceDescription"
TextMode="MultiLine"
rows="10"
BorderWidth="0"
runat="server" />

How to make menu's second level static

I am using an asp:menu control to display a menu. It uses a SiteMapDataSource for it's data.
I would like to see make the top two level static and the other levels appear if the mouse hover's over them.
Here is the code.
<asp:Menu ID="Menu1" runat="server" BackColor="#000000" DataSourceID="SiteMapDataSource" DynamicHorizontalOffset="0" Font-Names="Verdana" Font-Size="Small" ForeColor="#ffffff">
<StaticSelectedStyle BackColor="#000000" />
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#284E98" ForeColor="#FFFFFF" />
<DynamicMenuStyle BackColor="#000000" />
<DynamicSelectedStyle BackColor="#000000" BorderStyle="Double" />
<DynamicMenuItemStyle BackColor="#000000" HorizontalPadding="5px"
VerticalPadding="2px" />
<StaticHoverStyle BackColor="#000000" ForeColor="White" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource" runat="server" />
Is there any way to do such a thing?
Try setting StaticDisplayLevels
<asp:Menu ID="Menu1" StaticDisplayLevels="2" runat="server" BackColor="#000000" DataSourceID="SiteMapDataSource" DynamicHorizontalOffset="0" Font-Names="Verdana" Font-Size="Small" ForeColor="#ffffff">

Resources