public void SendMessage()
{
try
{
string Msg = "your messgae";
Msg = Msg.Substring(1, 160);
string Url = "http://www.bulksms.ambikacomputers.com/messageapi.asp?username="your userid";password="your password'&sender="your sender id";mobile=" + txt_mobile.Text.Trim() + "&message=" + Msg;
System.Net.HttpWebRequest myReq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(Url);
//Get response from Ozeki NG SMS Gateway Server and read the answer
System.Net.HttpWebResponse myResp = (System.Net.HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
//inform the user
}
catch (Exception ex)
{
throw ex;
//if sending request or getting response is not successful, Ozeki NG - SMS Gateway Server may not be running
}
}