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 Way2sms.com
2) Fill the FromNumber, FromPassword before starting to send sms
private void SendSMS(string ToNumber, string Message)
{
SendSms.SendSMS objSms = null;
try
{
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;
}
else
{
lblError.Text = "Message sent successfully";
lblError.Visible = true;
}
}
catch (Exception)
{
throw;
}
finally
{
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
http://www.aswinanand.com/sendsms.php?wsdl
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
Is it gonna work from out side the India?