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
Did you know?Explore Trending and Topic pages for more stories like this.
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

Need Successful Return
Hello I am currently working a form here, and I have everything figured out except when I click the

Supress some serveroutput but not all
Hi,

I have a script I'm working on that uses plsql to create and RMAN script, this uses d

progress bar...need expert opinion of experienced webmaster
Hey guys, quick question:

I want to display a progress bar when I upload files, but I am not

Best way to read this text file.
Hi.I am planning to make a small application in C# to convert the players from Football manager 2010

Working with Global Variables
hi, I'm not really sure why the following code is returning a "Call to a member function getBan

Simple Question
I know this is a simple question, that if I knew what it was technically called i could probably loo

Convert .fdf to .pdf
I currently have a web form that uploads the form data to an .fdf file and emails it.

However

Image DPI
Hi.

I allow users to upload images, the user then is able to adjust several settings for the

Contact Form Not Working When I Add Validation Codes
So I built my first working PHP "Contact Us" like form. But, I have been trying to now mak

User input in to variable
Hi all,

I'm sure this is very easy but I'm having another brain freeze!

At the end of

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