Click here to Skip to main content
15,887,880 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
In this section we use the 3rd solution. During running time the page shows message send successfully but the sms not delivered to the given number. using this coding, what will do?

C#
protected void btn_Click(object sender, EventArgs e)
    {
        try
        {
 
            send("way2sms_userid", "way2sms_password", txtxmsg.Text, txtphn.Text);
            Response.Write("message send successfully......");
        }
        catch
        {
            Response.Write("Error Occured!!!");
        }
    }
    public void send(string uid, string password, string message, string no)
    {
        HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + 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();
        respStreamReader.Close();
        myResp.Close();
    }
Posted
Updated 14-Jun-13 4:05am
v3
Comments
Shubh Agrahari 23-Feb-13 2:50am    
hi buddy...for it to best googling......it helps you more...
Shubh Agrahari 23-Feb-13 2:53am    
and First thing is to check with Way2SMS if they are exposing any Web Service for sending SMS. If so, get the details about the Web Service and consume it to send SMS.
gangabharat 15-Mar-13 2:27am    
Dear Sir,

I am getting following error.

System.Net.WebException: The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.GetResponse() at NewProducts.send(String uid, String password, String message, String no)
Member 12560447 2-Jun-16 13:40pm    
The remote server returned an error: (404) Not Found.
HOW TO SOLVE THIS

Hi buddy


this will definitely help you....

Send SMS Using Or Without SMS Getway in asp.net

Happy to help
 
Share this answer
 
v2
now its not working . update some working source code
 
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