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

Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.

So this would write 2232 a

Multiple submit forms inside a mysql array page
Hi all,

Im having trouble to get the beneath script to work the thing i can't seem to get wor

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

Searching keywords from array
Hello everyone, Im just wondering if someone could help me with another issue im having. Im still le

insert quotes
Hi,

I have an output like this:
Code: john,18,Cancer
How can I change this to
Code:

Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit

I need desperate help with this php code integrated with flash please
Can someone please help me with this php code which I have been stuck on for weeks . I am trying to

CRM?
I think that's what they're called. Customer Management System? Anyway. Is there any good free ones

output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

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