You can use HTML and ASP.NET server controls with bidirectional text. Typically, text directionality is set using the dir attribute of the html element in a page, because text direction also affects the scroll bar position in some browsers. For more information, go to the
Control Reading Order
By default, controls inherit the reading order from the page they are in. Additionally, you can set the reading order for individual controls, as follows.
HTML server controls expose a Dir property that you can set in the Properties dialog box.
ASP.NET server controls expose a Direction property that you can set in the Properties dialog box.
For detailed information, see How to: Display Right-to-Left Text Using HTML Tags for Globalization.
The and controls always display Latin numerals, even if the regional settings indicate a different locale.
Mostly, the ASP.NET server controls that are used for validation support bidirectional languages. Note the following:
The validation controls do not ignore diacritics for the Arabic language.
In the RegularExpressionValidator control, add the
\Wspecifier to support characters in bidirectional languages.
For example, the following regular expression is used to validate an e-mail expression:
В Copy Code
The corresponding regular expression for multilingual text would be as follows:
В Copy Code
For detailed information about regular expressions, see .
For information about validating user input, see Validation ASP.NET Controls.
Under some circumstances, controls might clip text when the controls are set to right-to-left reading order. You can change this by padding the display for the control with a style setting such as the following: