This documentation is archived and is not being maintained.

Bi-directional Support for Web Applications

Visual Studio allows you to create Web applications that support bi-directional languages. Web applications have some issues that do not arise with client-based applications. For example, because the user interface is a browser that is not necessarily under your control, when you create your application, you must be aware of how users will access it.

Object Names in Web Applications

If your copy of Windows is configured with the appropriate language, Visual Studio allows you to use a bi-directional language when creating solutions, projects, and Web Forms pages. However, if the application will be accessed by people who do not have the proper language configuration, the names will not be processed properly.

For example, if you create Web pages with Arabic names, people without the Arabic Windows language pack will not be able to enter those names or even display them properly.

It is therefore recommended that in Web applications, you name elements using text that will be processed properly on all computers.

Culture Support

Culture and UI culture settings determine how an application works with dates, times, currency, and other information. Support for culture and UI culture is the same for bi-directional languages as it is for any other languages. For details, see Culture-Specific Classes for Global Windows Forms and Web Forms.


ASP.NET handles all text as Unicode, and therefore supports bi-directional languages inherently. However, you must still set encoding options to specify what encoding is used to exchange information with browsers, and what encoding to apply to the application's files. You can do this by setting the responseEncoding, requestEncoding, and fileEncoding options in the application's Web.config file. For details, see Editing the Web.config File for Web Forms Globalization. Alternatively, you can set encoding options for individual pages by setting the encoding attributes in the @ Page directive.

Right-To-Left Support

When you create Web Forms pages, you can set the dir (direction) attribute. This specifies whether you want the page to use uses left-to-right or right-to-left reading order. However, it is up to the user's browser to implement the appropriate behavior. For details, see Displaying Right-to-Left Text Using HTML Tags for Globalization.

Flow and Grid Layout

In Grid layout, controls are positioned on the page using x and y coordinates. When the page is set to use right-to-left reading order, the x and y coordinates use the top right corner as their origin. In some cases, the page displays in the browser somewhat differently than it does in Design view of the Web Forms Designer. Therefore, for greatest precision when laying out pages that will be displayed in right-to-left reading order, it is recommended that you use flow layout. For details, see Positioning HTML Elements in Design View.

Web Forms Controls

HTML and ASP.NET server controls support Unicode and bi-directional languages. For example, the controls support right-to-left reading order, and text-entry controls such as the TextBox control allow you to enter Arabic or Hebrew text. The Calendar control supports localized dates (such as Hijri for Arabic) and bi-directional text.

There are small issues with some controls when they are used with bi-directional languages. For details, see Web Forms Controls in Bi-Directional Applications.

See Also

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