Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to send a sms on Multiple phone number on one click and Pick cell number from Gridview in each row.

What I have tried:

i think loop could be used for this purpose but do not have idea how it will use in ASP.Net?
Posted
Updated 21-May-18 3:02am
Comments
Richard MacCutchan 21-May-18 3:50am    
A loop is the same type of operation in every programming language. Start with a list of numbers and pass each of them in turn to the function that sends the SMS message.
akhter86 21-May-18 4:29am    
will you do coding for LOOP then i can get an idea...
F-ES Sitecore 21-May-18 4:37am    
Buy a book on c# and go through it to learn the basics. If you seriously need someone to tell you how to write a loop because you don't know and can't use google then your basics need some major improvements.
Richard MacCutchan 21-May-18 4:45am    
Seriously? You do not know how to code a loop? Check the documentation for whichever language you are coding in.
akhter86 21-May-18 5:18am    
ok,

1 solution

Avoid the Loop, Store the information in DataTable and Call the method as bulk using Linq
DataTable recTable = new DataTable();

recTable.Select(string.Format("[code] = '{0}'", someName)).ToList<DataRow>().ForEach(r => r["Color"] = colorValue);
 
Share this answer
 
Comments
Richard Deeming 21-May-18 14:11pm    
That's not avoiding the loop; it's simply hiding the loop.

And if the OP is struggling to write a basic for or foreach loop, LINQ and lambda methods are more than likely beyond their abilities at the moment.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900