Send SMS using ASP.Net

A small Code Which Sends SMS from your ASP.Net Application

For it to work the Application you will need -
1) Account in
2) Fill the FromNumber, FromPassword before starting to send sms

private void SendSMS(string ToNumber, string Message)
SendSms.SendSMS objSms = null;
objSms = new SendSms.SendSMS();
objSms.AllowAutoRedirect = false;
if (!(objSms.sendSMSToMany(FromNumber, FromPassword, txtTo.Text, txtMessage.Text).Contains("done")))
lblError.Text = "some error in port. Please try after some time";
lblError.Visible = true;
lblError.Text = "Message sent successfully";
lblError.Visible = true;
catch (Exception)
if (objSms != null) objSms = null;

In the above code 'SendSms.SendSMS' is a web service where you need to add web reference to your project

To Add that to your project solution explorer right click->Add Web Reference
type the url or copy paste the below url

And in Right Side Corner you find the Web Reference Name there give 'SendSms' or what ever you want

Hope that will help some one


  • SMSApplicationFromASP.Net (
  • Comments

    Author: Mohammad Vahaj uddin13 Nov 2009 Member Level: Silver   Points : 0

    Is it gonna work from out side the India?

    Author: Praveen13 Nov 2009 Member Level: Gold   Points : 2


    it according to the account you have created in

    if you register account from any other country you have to give your account number and account password

    and in even you can login with email but in my code you have to login with phone number that you have registered!!!!!

    Author: karthik29 Mar 2010 Member Level: Bronze   Points : 1

    I am developing windows application and i need to send sms from my application. I have used your code and it is giving "Error in port".What is the problem i am facing please guide me.

    Guest Author: rinku10 Dec 2012

    i have an account on way2sms. i want to send sms from C# language website.

    Author: Praveen29 Jan 2013 Member Level: Gold   Points : 2

    Hi rinku,

    The service reference is not working.

    the above link has example. Download smsclient.dll which they provided link and see the example code.

    Hope that will help you


    Guest Author: visweswararao13 Feb 2014

    it shows error when adding the web reference

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: