ASP.NET Web Controls in Bidirectional Applications
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 World Wide Web Consortium (W3C) Web site and see "Language Information and Text Direction." Additionally, you can configure ASP.NET server controls to use bidirectional text.
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.
Theand 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 \W specifier to support characters in bidirectional languages.
For example, the following regular expression is used to validate an e-mail expression:
The corresponding regular expression for multilingual text would be as follows:
For detailed information about regular expressions, see.
For information about validating user input, see.
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: