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

  • Home
  • SEARCH
  • 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 8816995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:44:46+00:00 2026-06-14T04:44:46+00:00

I am fetching data from a web service. I am using ASP.NET and VB.NET

  • 0

I am fetching data from a web service. I am using ASP.NET and VB.NET as code behind.

I tried like this:

Label_amount.Text = Trim(arData(11)) 

I am getting the output as 0020000, while I should get 200, i.e. suppress all leading zeros and delete last two zeros. (or make as 200.00)

  • 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-06-14T04:44:47+00:00Added an answer on June 14, 2026 at 4:44 am

    As others have said, if it is displaying as “0020000”, that must mean that arData(11) is a String. If it’s supposed to always be a numeric value, it would be best to parse it into a numeric data type, such as Integer or Decimal. Once you have the value stored as a numeric type, you can easily manipulate it (such as dividing by 100) and format it as desired. For instance:

    Dim value As Decimal = Decimal.Parse(arData(11))
    value = Value / 100
    Label_amount.Text = value.ToString("N2")
    

    Keep in mind that the Parse method will throw an exception if arData(11) does not contain a valid numeric value, so you may want to wrap it with a try/catch, or use the TryParse method instead, depending on your needs. ToString("N2") will return “200.00”, ToString() will return “200”, and ToString("C") will return “$200.00” (in the US).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using asp.net and vb.net (code behind) to fetch some data from a
So I've been working on fetching data from a web service and using it
What happens is, I am fetching the data from web service. Simultaneously 6 async
I have an ASP.NET MVC 3 (.NET 4) web application. This app fetches data
jokesArray is a NSArray This is my Data from Web service: ( { _id
I am fetching data from some tables & storing it in a variable like
I have an App using UITableViews and fetching data from a server. I am
This is my php script for fetching data from a db. <?php mysql_connect(host,user,pass); mysql_select_db(db);
I'm using Spring JdbcTemplate interface for fetching data from a MS SqlServer DB. In
I am fetching some data from a site using its API-key and some other

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.