using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net;
using System.IO;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string mobileno=TextBox1.Text;
string msg=TextBox2.Text;
///SMS GATEWAY PROVIDER PATH
string url = string.Format("http://XXXXProvider.com.com?phoneNumber={0}&MsgTxt={1}", mobileno, msg);
string url1 = String.Format(url, mobileno, msg);
//create Web Request object for the url
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url1);
// get the response from the web request
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
// read the response from the WebResponse in to a stram
Stream s = res.GetResponseStream();
StreamReader rdr = new StreamReader(s);
string result = rdr.ReadLine();
s.Flush();
s.Close();
}
}
The above code run successfully....... but sms didnt sent to mobile.....
Give me the correct solution......
Thanks advance...
Regards,
M.Mareeswaran