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 help with PHP/MySQL drop down menu
I need help on how I can implement a drop down menu which queries mysql database and output the avai

help need on ob_start()
Hi

I am a newbie in php, I have a code
Line number On/Off | Expand/Contract <?phpo

confused between ' ' and " "
there is a php i set:
$begin_date_query = mysql_query( "SELECT SUBDATE(due_date, INTERVAL $d

str_replace help
Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean

Quick fix: Conditional statement with an array
Hi, I'm getting the temperature value off of the Environment Canada website along with the icon file

INSERT for date range
Hi all

I have the following table

Code: [Select] `date` date
`day` int(2)
`

issues verifying if user is logged in
I am having issues when a user logs in via asp Login control, the IsAuthenticated still seems to com

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,

gather checkbox data from form into email
Hello all,

First, i'd like to thank everyone who responded to my previous posts regarding set

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