hi,
i am sending message to multiple mobile numbers. i am taking one textbox for enter mobileno's for sending a message. if user want to send multiple mobileno's then put comma and write another mobileno.
i write a one method i.e., sendMessage() in this method i retrive mobileno from textbox. i send message to one mobile number its working but user user enter multiple mobileno's that time number comes one by one to the SendMessage() method from textbox.
how to write this type of code?
please give a solution
thanks
Loading
Lakitha MunasinghePosted Jul 17, 2010, 11:27 PM
the easiest way to get your requirement is to do a string concatenating. You need to split the string. Here's the code....
Your text box input = 07777777777, 0777777752555, 0775245449666, 077324873333
--------------------------
string textInput = "07777777777, 0777777752555, 0775245449666, 077324873333";
string[] mobileList = textInput .Split(',');
// Here you gives the character that delimits the substring in the first string. You will get all the mobile no.s in the mobileList array.
--------------------------
Good Luck!!!
Lakitha Munasinghe
Raghavendra UPosted Jul 15, 2010, 3:11 AM
ArshadPosted Jul 15, 2010, 2:53 AM
If you have multiple numbers, just check for the exact cell number length like 10 digit, then insert the ',' with the use of for loop, use the string builder for this operation.
Regards,
Arshad