tags:

views:

47

answers:

2

How do I put a phone number into 3 text boxes when the data is stored in a single field in the database?

I want to show something like: 123-456-7890

A: 
string[] phoneNumber= fromDBNumber.split("-"); 
anishmarokey
doing it with asp
sujatha
is this possible to do it in asp
sujatha
if anyone knows plz reply
sujatha
A: 

what language are you using?

if c# or java then string[] numbers = fromDBNumber.split("-");

then put numbers[0], [1] and [2] into the text boxes

of if you store the number as 9787545747 then you could use subString to split the number at certain points.

        string d = "9787545747";
        string g = d.Substring(0, 3);
        string f = d.Substring(4, 7);
        string h = d.Substring(5, 9);

the above is untested

griegs
written in asp..
sujatha