Solved

Get thousand separator

Posted on 2011-09-06
9
614 Views
Last Modified: 2012-05-12
Hi,

In a ASP.NET application how can I get the client-side thousand separator, date format, etc.?

Other question. Can I get the thousand separator in a javascript function?

Thanks in advance, Camarate
0
Comment
Question by:Marcelo Camarate
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 16

Expert Comment

by:disrupt
ID: 36489418
0
 

Expert Comment

by:daDarek
ID: 36489463
Hi Camarate,

You can look at the Accept-Language request header to determine what preferred language is set on the users browser.  In that header you should see the language code and country code (i.e. "en-us") and based off of that code you can create a System.Globalization.CultureInfo object that you can use to determine how numbers are formatted in that language/country.

Does this get you in the right direction?

-Darek
0
 

Author Comment

by:Marcelo Camarate
ID: 36489526
Hi disrupt,

Thanks for your reply.

But, the two link that you suggested are to format numbers with a comma thousand separators. What I want is to know the thousands separator character that is active on the client side.

Regards, Camarate
0
 
LVL 16

Expert Comment

by:disrupt
ID: 36489549
hmm I am not sure why you would want to retrieve that can you elaborate?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 16

Expert Comment

by:disrupt
ID: 36489579
0
 

Expert Comment

by:daDarek
ID: 36489631
Camarate,

Are you trying to perform the formatting with Javascript on the client, or with .NET on the server?

-Darek
0
 

Author Comment

by:Marcelo Camarate
ID: 36489739
Hi daDarek,

Thanks for your suggestion. I'll be checking it. To answer your last question, I want to know the thousand separator in both environments, server and client side.

___________________________________________________

Hi disrupt,

Thanks for new suggestions. I'll be checking them.

________________________________________________

Hi all,

I will be going to a outside service, so I can not be checking my emails for a while. So, I will reply you as soon as possible.

Regards, Camarate

0
 
LVL 19

Accepted Solution

by:
Manoj Patil earned 125 total points
ID: 36489754
I am not confirm about your requirement. Let me know if this is solution

for(int i = numberVariable.length -1; i >= 0; i--){
    int temp = numberVariable[i];
    while(temp>0){
        test_Array.add(0, temp%10);  
        temp = temp /10;        
    }
}
 

Open in new window

0
 

Author Comment

by:Marcelo Camarate
ID: 36592808
Hi,

I need more time to check the suggestions because I'm involved entirely in another project.

Regards, Camarate
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now