Click here to Skip to main content
14,538,906 members
Rate this:
Please Sign up or sign in to vote.
See more:
I am using the following code but there is no error shown but sms not goes to mentioned phone number, what is the problem?
protected void Button1_Click(object sender, EventArgs e)
        sendSMS("9331619281", "8845", "checking", "9331619281");


  public void sendSMS(string uid, string password, string message, string no)
        HttpWebRequest myReq =
        (HttpWebRequest)WebRequest.Create("" + uid + "&pwd=" + password +
        "&msg=" + message + "&phone=" + no + "&provider=way2sms");

        HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
        System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
        string responseString = respStreamReader.ReadToEnd();
Updated 13-Feb-13 11:37am
Garth J Lancaster 13-Feb-13 17:58pm
does 'responseString' have anything in it ?
jayasree acharyya 13-Feb-13 18:27pm
you may send me another example how to send sms to mobile numbers from web application
jayasree acharyya 13-Feb-13 18:29pm
you can solve using your own, any how i need the solvation
Garth J Lancaster 13-Feb-13 18:37pm
How about answering the question ? I dont know the way2sms API, but it occurs to me, looking at YOUR code, that some sort of response - maybe ok or error, is returned as a result of that call, and that response is contained in responseString ... so, set a break point on it, or log/dump the value out somewhere, and check it ... if you cant/wont learn how to debug code, any other code someone gives you may be useless

Failing all else, this may provide some help
jayasree acharyya 13-Feb-13 19:10pm
there is 2 in responsestring
Rate this:
Please Sign up or sign in to vote.

Solution 1

Try using Hike, they have come up with some similar strategy
Rate this:
Please Sign up or sign in to vote.

Solution 2

You can use n numbers of SMS gateway[^] to do this.

A similar answer has given here:
Sending Sms Using[^]

A related Article you can find below:
Sending SMS using .NET[^]
Sending SMS using .NET through a Web service[^]


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100