0

asp.net-4.5 , Visual-Studio-2013 , Win7.

Reproduced the problem on a minimized project : empty web application with 1 web-form with Dir=rtl (right-to-left) and a Menu control.
Works fine but the arrows are on the right side and I need them on the left side.

Here is what I get:

enter image description here
And this is what I need (I used Paint to make this image) :
enter image description here

There's a solution for this circulating around here but it's for asp.net-2.0. Not working for 4.5.

My code:

<%@ Page Language="C#" CodeBehind="WebForm1.aspx.cs" Inherits="Arrow_RTL_in_Menu.WebForm1" %>
<!DOCTYPE html>
<html dir="rtl" xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"><title></title></head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Menu ID="Menu1" runat="server"
                StaticPopOutImageUrl="~/Images/Left_Arrow.gif"
                DynamicPopOutImageUrl="~/Images/Left_Arrow.gif">
                <Items>
                    <asp:MenuItem Text="AAA" Value="AAA" NavigateUrl="~/Default.aspx">
                        <asp:MenuItem Text="AAA-1" Value="AAA-1" NavigateUrl="~/Default.aspx"></asp:MenuItem>
                        <asp:MenuItem Text="AAA-2" Value="AAA-2" NavigateUrl="~/Default.aspx"></asp:MenuItem>
                        <asp:MenuItem Text="AAA-3" Value="AAA-3" NavigateUrl="~/Default.aspx"></asp:MenuItem>
                    </asp:MenuItem>
                    <asp:MenuItem Text="BBB" Value="BBB" NavigateUrl="~/Default.aspx">
                        <asp:MenuItem Text="BBB-1" Value="BBB-1" NavigateUrl="~/Default.aspx">
                            <asp:MenuItem Text="BBB-1-1" Value="BBB-1-1" NavigateUrl="~/Default.aspx"></asp:MenuItem>
                            <asp:MenuItem Text="BBB-1-2" Value="BBB-1-2" NavigateUrl="~/Default.aspx"></asp:MenuItem>
                        </asp:MenuItem>
                        <asp:MenuItem Text="BBB-2" Value="BBB-2" NavigateUrl="~/Default.aspx"></asp:MenuItem>
                        <asp:MenuItem Text="BBB-3" Value="BBB-3" NavigateUrl="~/Default.aspx"></asp:MenuItem>
                    </asp:MenuItem>
                </Items>
            </asp:Menu>
        </div>
    </form>
</body>
</html>

Any idea where to start looking would be very much appreciated! Thank you!

gadi
  • 481
  • 3
  • 14
  • 32
  • So where are all the Arabs and Israelis when you need them? :-) This is a problem for right-to-left programmers. – gadi Jun 03 '15 at 17:35

1 Answers1

0

Got the answer in another forum :

In the menu properties list, under the "Layout" category", I changed the RenderingMode property to "Table".

My code now (where the change was made) :

            <asp:Menu ID="Menu1" runat="server"
                StaticPopOutImageUrl="~/Images/Left_Arrow.gif"
                DynamicPopOutImageUrl="~/Images/Left_Arrow.gif" RenderingMode="Table">
                <Items> .........

Works beautifully!!!

Gadi

gadi
  • 481
  • 3
  • 14
  • 32