none
Master Page With Arabic Menu.

    Question

  • Good day,

    I am building an Arabic ASP.NET web site.

    On the master page, I want the menu items to be aligned from right to left instead of left to right.

    How can I do this.

    Your help is appreciated.

    Thanks/Regards.

    Assem Shawkat.

    Saturday, December 24, 2016 5:08 AM

Answers

  • When you design Arabic Web Forms pages, the best way to make text flow from right to left is to use the DIR (direction) attribute. We can specify DIR as RTL (right-to-left) as detailed below

    HTML dir="rtl"
    body dir="rtl"

    TABLE dir="rtl" …
    asp:TextBox dir="rtl".

    Also you can define styles & apply to controls.

    To set default culture use in Application_Start

    Thread.CurrentThread.CurrentCulture = new CultureInfo("ar-SA");
    Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar-SA");


    It all Happenz Sendil

    • Marked as answer by Assem Shawkat Saturday, December 24, 2016 7:05 AM
    Saturday, December 24, 2016 6:39 AM

All replies

  • When you design Arabic Web Forms pages, the best way to make text flow from right to left is to use the DIR (direction) attribute. We can specify DIR as RTL (right-to-left) as detailed below

    HTML dir="rtl"
    body dir="rtl"

    TABLE dir="rtl" …
    asp:TextBox dir="rtl".

    Also you can define styles & apply to controls.

    To set default culture use in Application_Start

    Thread.CurrentThread.CurrentCulture = new CultureInfo("ar-SA");
    Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar-SA");


    It all Happenz Sendil

    • Marked as answer by Assem Shawkat Saturday, December 24, 2016 7:05 AM
    Saturday, December 24, 2016 6:39 AM
  • I would like to thank you very much for your kindness.

    In the source view of my master page, I changed:

    <asp:Menu

    to <asp:Menu dir="rtl"

    It worked.

    Thanks again.

    Regards.

    Assem Shawkat.

    Saturday, December 24, 2016 7:05 AM