Click here to Skip to main content
16,004,678 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to send sms to mobile using c# winforms ??
Posted
Comments
Shambhoo kumar 24-Aug-13 2:32am    
Have you any SMS API.????
Thanks7872 24-Aug-13 2:35am    
Do you think this as question?

1 solution

--------Send SMS all over the world and specifice countries--------
Code for send SMS to mobile:
-------------------------------------------------------------------
Web Service in Used:

For sending SMS to the world: http://www.webservicex.com/sendsmsworld.asmx?WSDL
For sending SMS to India: http://www.webservicex.net/SendSMS.asmx?WSDL

-------------------------------------------------------------------
private void Send_Click(
object sender, System.EventArgs e)
{
try
{
SmsTest.net.webservicex.www.SendSMS smsIndia=
new SmsTest.net.webservicex.www.SendSMS();
SmsTest.com.webservicex.www.SendSMSWorld smsWorld =
new SmsTest.com.webservicex.www.SendSMSWorld();
if(rdoType.SelectedValue == "1")
smsIndia.SendSMSToIndia(txtMobileNo.Text.Trim(),
txtEmailId.Text.Trim(), txtMessage.Text);
else
smsWorld.sendSMS(txtEmailId.Text.Trim(),
txtCountryCode.Text.Trim(), txtMobileNo.Text.Trim(),
txtMessage.Text);
lblMessage.Visible = true;
lblMessage.Text="Message Send Succesfully";
}
catch(Exception ex)
{
lblMessage.Visible = true;
lblMessage.Text="Error in Sending message"+ex.ToString();
}
}

private void rdoType_SelectedIndexChanged(
object sender, System.EventArgs e)
{
if(rdoType.SelectedValue =="1")
txtCountryCode.Enabled = false;
else
txtCountryCode.Enabled = false;

}
 
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