Vishal Singh

Vishal Singh

  • NA
  • 12
  • 8.6k

Sent sms using api

Apr 27 2016 4:08 AM
i purchased sms gateway and i have an api of that getway but when i sending a sms to mobile all code working fine but not getting sms please solve my issue its urgent my code is
public void send()
{
String sURL;
System.IO.StreamReader objReader;
sURL = @"http://nimbusit.co.in/api/swsendSingle.asp?username=##########&password=##########&sender=SenderID&sendto=##########&message=hello";
System.Net.WebRequest wrGETURL;
wrGETURL = System.Net.WebRequest.Create(sURL);
try
{
System.IO.Stream objStream;
objStream = wrGETURL.GetResponse().GetResponseStream();
objReader = new System.IO.StreamReader(objStream);
objReader.Close();
}
catch (Exception ex)
{
ex.ToString();
}
}
protected void BtnSent_Click(object sender, EventArgs e)
{
send();
ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", "alert('sms sent successfully...');", true);
}
 

Answers (1)