Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7695723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:36:35+00:00 2026-05-31T21:36:35+00:00

I have an XML field that I try to print it with commas in

  • 0

I have an XML field that I try to print it with commas in the thousands (example : 1,234)

this is my code :

<span><%=String.Format("{0:n}", dc.GetXMLField(nl[i], "PRICE")) + " ₪"%></span>

When I run this, I get the number without any commas (for example : 200000)
by the way, its a string..

thanks for the helpers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:36:36+00:00Added an answer on May 31, 2026 at 9:36 pm

    dc.GetXMLField is returning a string, not a formatable number (int, decimal, etc), but in order for string.Format("{0:n}", num) to work, num has to be an actual number, not a string representation of a number.

    If you know this will always be a number you could parse it into a number first, before attempting to format it:

    String.Format("{0:n}", int.Parse(dc.GetXMLField(nl[i], "PRICE")))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this large XML file. There is a field that I want to
I have some xml like this: <Data> <Rows> <Row> <Field Name=title>Mr</Field> <Field Name=surname>Doe</Field> <Row>
I have an xml file that looks like this: <!DOCTYPE ROOT SYSTEM zombie.dtd> <ROOT>
I have an XML field that I know will have at least one ChildNode
I have this code inside a field changed event of a browser enabled infopath
We have a string field which can contain XML or plain text. The XML
I have a XML file containing metadata like a field's maximum length. I have
I have a field: public Field[][] fields; And I want an XML: <Fields> <Field
I have XML files in a directory that I wish to get over to
Can someone check my .NET code that I have in an InfoPath button to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.