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

Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like

Grids not displaying decimals, and behaving differently on different PCs?
Hello,

I coded a relatively simple MII application that allows data from a form to be add

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

Hotlinking Picasa as the image folder of a website
Hi there PHP freaks, I would like to create a private album in Picasa to use it as the image folder

max() problem
I have a while loop to get image names.
Code: $imagequery = mysql_query("SELECT * FROM ad_i

Error in SQL Syntax HELP!!!
I have this page:

Code: <?php

session_start();

//connect to server and s

Using the $_GET variable to view certain records
Hello,

First let me explain my problem, I have 2 pages the first page pull a list of Guide ti

Run function every 5 mins ??
I have a function PostMessage()

How can I run it every 5 mins ??

How to read CSS message data
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really di

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

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