This documentation is archived and is not being maintained.

Web Forms Controls in Bi-Directional Applications

You can use HTML and ASP.NET Web controls in applications with bi-directional text.

Control Reading Order

By default, controls inherit the reading order from the page they are in (that is, from the setting of the page's DIR attribute). You can set the reading order for individual controls as well. HTML controls expose a dir property that you can set in the Properties window. For ASP.NET controls, you set the dir property in HTML view. For details, see Displaying Right-to-Left Text Using HTML Tags for Globalization.

Displaying Numerals

The DropDownList and ListBox controls always display Latin numerals, even if the regional settings normally display Hindi numerals.

Validation Controls

For the most part, the ASP.NET validation Web server controls support bi-directional languages. Note the following:

  • The validation controls do not ignore diacritics for the Arabic language.
  • In the RegularExpressionValidator control, add the \W specifier to support characters in bi-directional languages. For example, the following regular expression is used to validate an email expression:

    The corresponding regular expression for multilingual text would be:


    For more details about regular expressions, see .NET Framework Regular Expressions.


Under some circumstances, controls might clip text when set to right-to-left reading order. You can overcome this problem by padding the control's display with a style setting such as the following:

style="PADDING-RIGHT: 5px"

See Also

Bi-directional Support for Web Applications | Globalizing Web Forms Pages | Localizing Applications | Visual Studio .NET With Arabic Language Support (this link goes to the Web site)