Format String help


Posted on 16th Feb 2014 07:03 pm by admin

I have a textbox where a person enters an application number. the application number is 10 characters in length:ex: 000012345A0256775434
My clients only want to enter in the numbers without the leading zeros. This is fine but I want to be able to take the numbers they enter and then add in the leading zeros. So essentially I want to format whatever string they enter to make sure they all conform to the 10 characters in length whereby the zeros are added in if it is not. I thought I could so something like this.textbox.ToString("0000000000"). But that doesnt seem to work. Any ideas.?

No comments posted yet

Your Answer:

Login to answer
252 Like 17 Dislike
Previous forums Next forums
Other forums

Dynamic Array using glob?
Is there an easier way to do this?

I am trying to get create a dyamic array based on files wi

Save cookie to DB
I'm working on a pixel tracking script for an incentive website and I need to use an ASP script to s

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Simple MySQL query...
Hello,
How could I do a mysql query that does this: SELECT * WHERE date/time < 5minutes ag

Extracting URL pointer within XML tag
Hi.

I'm trying to extract text between two quotation marks in XML. For example, I want to ex

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash