对文本框中的逗号分隔存有疑问? [英] doubt in comma seperation in textbox?

查看:63
本文介绍了对文本框中的逗号分隔存有疑问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在向多个手机号码发送消息.我正在用一个文本框输入手机号来发送消息.如果用户要发送多个mobileno,请输入逗号并编写另一个mobileno.
我写了一个方法,即sendMessage()这种方法我从文本框中检索mobileno.我将消息发送到一个可以正常工作的手机号码,但是用户用户输入了多个手机号码,那个时间号码从文本框到SendMessage()方法是一个接一个的.
如何编写这种类型的代码?

请给一个解决办法

Thanks


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

推荐答案

在字符串类上使用split方法将一小段文本转换为数字集合.
Use the split method on the string class to turn the one bit of text into a collection of numbers.


我相信*应该*成为潮流!一对一.您是否希望所有数字都立即到达"SendMessage()"方法,并且同时向所有这些消息发送消息?那是不可能的.这是一种队列,一个接一个地执行.

如果您还有其他疑问,请使用它来更新问题.
I believe that *should* be the flow! One by one only. Are you expecting that all the numbers come to ''SendMessage()'' method at once and it sends message to all of them simultaneously? That would not be possible. It''s sort of queue and one by one would be executed.

If you have other doubt then update the question with it.


这篇关于对文本框中的逗号分隔存有疑问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆