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

Parse error: syntax error, unexpected T_ELSEIF in /home/......html/item.php on l
I do not know what is wrong with this. Hope some one can help. I do nto want to post the entire site

ScriptResource.axd gives an error on fresh install of ASP.NET Ajax 1.0
Hello,I have a fresh install of Microsoft ASP.NET Ajax 1.0. When I create an Ajax enabled website in

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

Cannot Display Array from Select Statement + Login question
Hi,
I'm new to PHP but so far so goog. I was assigend a project and I'm very close to completion.

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

Estimations and Effort
HI Gurus,

Would like to know whether SAP have a provision for carrying out the Project es

Help with captcha script needed
Hello,

I am working on a script where reCAPTCHA or a similar form of CAPTCHA will be used, f

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

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