Friday, August 24, 2012

SENDING SMS VIA WAY2SMS IN ASP.NET C#

 



Here is the code for sending sms via way2sms in asp.net c#. It is one way api, that is we can only send sms, no receiving facility is provided. For using this code first you should create a account in way2sms with a valid Indian mobile phone number. Then you get username and password. Use the code as you like.
#####################################################################################
 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();
}


(2)- On The aspx page take two textboxes and a button and on the click event of the button call the function like--

protected void Button1_Click(object sender, EventArgs e)
{
send("yourmobileno","yourpassword", TextBox2.Text, TextBox1.Text);
}

//only change yourmobileno and
//yourpassword below
//TextBox2.Text for message and
//TextBox1.Text for reciever no


(3)- Dont forget to use namespaces
using System.Net;
using System.IO;

//************Hope it helps************//


###################################################################################


You might also like:

All Mobiles Secret Codes

Download youtube videos without any sofware

10 Worst Cyberattacks in 2012

Gadget Innovations of 2012

16 comments:

  1. How to send sms to 20 different mobiles one after another !!!!! please reply at tyagi.chan@gmail.com

    ReplyDelete
    Replies
    1. sir give me code on this mail id ffateh1993@gmail.com sir pls......i am student

      Delete
    2. Technicalideas Books Notes Programs Tips: Sending Sms Via Way2Sms In Asp.Net C >>>>> Download Now

      >>>>> Download Full

      Technicalideas Books Notes Programs Tips: Sending Sms Via Way2Sms In Asp.Net C >>>>> Download LINK

      >>>>> Download Now

      Technicalideas Books Notes Programs Tips: Sending Sms Via Way2Sms In Asp.Net C >>>>> Download Full

      >>>>> Download LINK tv

      Delete
  2. Replies
    1. can u send me email coding on this email id
      shailu.mane@gmail.com

      Delete
  3. sir please give me full source code. i want when any client set a day.sms will send automatic.using way2sms api.
    my mail id : dubeys660@gmail.com

    i have not any idea
    waiting for response

    regards
    sachin

    ReplyDelete
  4. How to receive SMS through way2sms using asp.net c#?
    Please reply.
    my mail id:onlyashraful@gmail.com

    thanks
    Ashraful

    ReplyDelete
  5. Sir i am using same code , few days earlier it was working , but now it is not working.

    With Regard

    Abhishek Kumar

    ReplyDelete
  6. its not working sir what can i do

    ReplyDelete
  7. pls.. give me source Code sir..
    my Email Id-prafuldesai786@gmail.com

    ReplyDelete
  8. this code is not sending a sms to mobile please help me i m fresher
    pls send me running code on my id vipuljain1090@gmail.com

    ReplyDelete
  9. i didn't get any error.but No sms send..Please help me. i have to do this.

    ReplyDelete
  10. Sir I have write same code but not sms send Please Response me on this ID harishpalsule@gmail.com i am waiting for response

    ReplyDelete
  11. sir please give me full source code. i want when any client set a day.sms will send automatic.using way2sms api.
    my mail id : raviraj.m142@gmail.com

    i have not any idea
    waiting for response

    regards
    Raviraj

    ReplyDelete
  12. please give me the solution to occur this error
    The remote server returned an error: (404) Not Found.

    ReplyDelete
  13. Technicalideas Books Notes Programs Tips: Sending Sms Via Way2Sms In Asp.Net C >>>>> Download Now

    >>>>> Download Full

    Technicalideas Books Notes Programs Tips: Sending Sms Via Way2Sms In Asp.Net C >>>>> Download LINK

    >>>>> Download Now

    Technicalideas Books Notes Programs Tips: Sending Sms Via Way2Sms In Asp.Net C >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete