Last post Jan 10, 2008 06:51 AM by ddpoona
Jan 10, 2008 02:55 AM|ddpoona|LINK
I am developing a site in which i need to display date-time and currency formats as per the country.
for ex. in India it should be rupees and in USA it should be dollars.
I am new to this concept and asp.net 2.0.
How to do this,
I read about localization, but I am confused how to generate separate pages for each Culture.
Please let me know and if possible also give me code for how to achieve that in asp.net 2.0
using vb as the programming language.
Jan 10, 2008 03:16 AM|kipo|LINK
Here is example:
1. Put <globalization culture="auto"/> in web.config file inside <system.web> tags.
2. Put <asp:Label ID="Label1" runat="server"></asp:Label> on your page
3. Add this code in code-behind (Page_Load event):
Dim dec As Decimal = 10
Label1.Text = dec.ToString("c")
Jan 10, 2008 06:51 AM|ddpoona|LINK
Thank for the reply.
I want to have it like this.
Through the interface I will set up the cost and it should be changed as per the culture settings.
The user will view (Products.aspx) page.
eg. I have a form with products and 10 radio buttons (Products.aspx) which will display the cost for the corresponding product as the cost I has set.
The cost is displayed as dollars by default. When this page is opened by setting for browser as 'US' then it should be displayed as dollars.
when the same form (Products.aspx) is opened for 'UK' settings it should show as their currency (eg.Pound if I am not mistaken) and so on for other currencies
I know currency differs, but this is the requirement I have.
Also how will it work through mozilla firefox.
Please help me as I am new to this development field.
I read about localization and globalization but I am very much confused about it.
It will be great if someone can provide code for my example.
I want to achieve this functionality through code.
Thanks in advance.