views:

254

answers:

2

Hi friends, I'm working on a multi-lingual application which requires me to change the text direction (either ltr or rtl) dynamically according to the user language.

I used a label for this. I assigned it a css class which would set the direction but its not working.

I also added a style to its CssStyleCollection list but its not working too.

Where am I doing it wrong? What are the ways in which it can be achieved?

+4  A: 

There is a great resources on MSDN that should be helpful.

Sean Molam
+2  A: 

If you post the CSS you're using, I may be able to identify anything that could be wrong with it. Otherwise, try this in your label control:

Label myLabel = new Label();
myLabel.Attributes.Add("dir", "rtl");

Of course, you may want to set the direction at a top-level tag such as the <body /> so it affects the entire page and not just one label.

Dan Herbert
Thanks for your reply Dan. It worked out fine.
buntykawale