Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello

how can i Send SMS by ASP.Net?
free not $.

thanks

What I have tried:

i dont know what is this section "
What have you tried?
"
Posted
Updated 6-Nov-18 3:13am

Sending SMS's costs somebody money: so finding a truly free SMS sending service is going to be down to you and Google - the chances are that you won't find one that will let you send more than one or two per hour, or will have other restrictions on you.

Quote:
i dont know what is this section "What have you tried?"

It's a place for you to show us that you have made an effort to do at least some of the problem yourself, and to let us know what you have tried and why it didn't work - so we don't repeat the same work over again.
Not putting anything in it says "I can't be bothered to do this task - you do it for me" - which is both rude and unlikely to help you get a solution handed to you...
 
Share this answer
 
Comments
Vincent Maverick Durano 6-Nov-18 16:40pm    
5ed
You might have to use a Webservice Here's a link to solved solutions
c# - Sending SMS from an ASP.NET website - Stack Overflow[^]
 
Share this answer
 
private void LoadAcount()
   {
           if (smsdt.Rows.Count > 0)
           {
               ViewState.Add("Domain", "your website sms");
               ViewState.Add("Username", "name");
               ViewState.Add("Password", "pass");
           }
   }
   public void SendSMSE(string number,string smsmess)
   {
       LoadAcount();
           string returnValue = "";
           string url = "";
           url = ViewState["Domain"].ToString() + "/api/sendsms.php?username=" + ViewState["Username"].ToString() + "&password=" + ViewState["Password"].ToString() + "&message=" + smsmess + "&numbers=" + number + "&sender=" + "NewSms" + "&return=string";

           StreamReader strReader;
           WebRequest webReq = WebRequest.Create(url);
           WebResponse webRes = webReq.GetResponse();

           strReader = new StreamReader(webRes.GetResponseStream());

           returnValue = strReader.ReadToEnd();
           if (!string.IsNullOrEmpty(returnValue))
           {
               if (returnValue == "receipt mess sacc")
               {
                   AlertLabel.Text = returnValue;
               }
               else
               {
                   AlertLabel.Text = returnValue;
               }

           }
   }
 
Share this answer
 

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