pavithra

pavithra

  • NA
  • 25
  • 1k

sms sending in windows form

Apr 2 2017 11:52 PM
While i execute this coding no error will occur. but i doesnt receive any sms. Anyone pls help
 
 
try
{
WebClient client = new WebClient();
string to, message,link;
link="http://198.24.149.4/API/pushsms.aspx?loginID=login&password=123456";
to = txtmob.Text;
message =" Please collect Your Id card From Registration Counter";
string baseURL = ""+ link + "&mobile= " + to + "&text=" + message + "&senderid=MEDEXP&route_id=2&Unicode=0 ";
client.OpenRead(baseURL);
client.OpenWrite(baseURL);
// MessageBox.Show("Success");
// client.DownloadString(baseURL);
if (client.DownloadString(baseURL).Contains("Success"))
{
MessageBox.Show("Sms sent successfully", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
MessageBox.Show("Some issue delivering", "Message", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception exp)
{
MessageBox.Show(exp.ToString());
}
}

Answers (1)