public void sendSMS(string uid, string password, string message, string no)
{
HttpWebRequest myReq =
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://moneycentral.msn.com/investor/StockRating/srstopstocksresults.aspx?sco=1&page=1col=13" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=way2sms");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
if (TextBox1.Text != String.Empty && TextBox2.Text != String.Empty)
{
sendSMS("yourmobileno", "yourpassword", TextBox2.Text, TextBox1.Text);
TextBox1.Text = String.Empty;
TextBox2.Text = String.Empty;
Label3.Visible = true;
Label3.Text = "Message Sented";
}
else
{
Label3.Visible = true;
Label3.Text = "Not Sented";
}
}
catch (Exception)
{
throw;
}
}
{
HttpWebRequest myReq =
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://moneycentral.msn.com/investor/StockRating/srstopstocksresults.aspx?sco=1&page=1col=13" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=way2sms");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
if (TextBox1.Text != String.Empty && TextBox2.Text != String.Empty)
{
sendSMS("yourmobileno", "yourpassword", TextBox2.Text, TextBox1.Text);
TextBox1.Text = String.Empty;
TextBox2.Text = String.Empty;
Label3.Visible = true;
Label3.Text = "Message Sented";
}
else
{
Label3.Visible = true;
Label3.Text = "Not Sented";
}
}
catch (Exception)
{
throw;
}
}
It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues.
ReplyDeleteWay2sms login
thank u for ur response sir
ReplyDeletei tried ur code but i am getting an error as
ReplyDeleteThe remote server returned an error: (503) Server Unavailable.
please help..
r u entering namespace for your application
ReplyDeletename space means.. please help me..
ReplyDeleteI AM POSTING ANOTHER POST PLZ CHECK IT ONCE I THINK IT PROBABLY WORK K
ReplyDeleteplease help..
ReplyDeleteU WANT ONLY SEND SMS THROUGH WAY2SMS R SMTP
ReplyDeletethrough WAY2SMS .please help me..
ReplyDeleteis it possible through SMTP..
ReplyDeleteR U ENTERDE THE NAMESPACE AS
ReplyDeleteusing System.Net;
using System.Net;
Deleteusing System.IO;
yes it is possible through smtp
ReplyDeleteyes..
ReplyDeleter u tried my code through smtp
ReplyDeleteno can u give the code...
ReplyDeleteplease help...
ReplyDeletei already post that code check it once
ReplyDeleteSEND EMAILS FROM YOUR APPLICATIONS
ReplyDeletecheck this link
i want to send sms..
ReplyDeleteplease help..
ReplyDeleteactually wats the problem is
ReplyDeletei given this below url in coding for communicator between way2sms and u
this url temporarly stoped by the administrator so we cant access that site right u use diff url on that place k
http://ubaid.tk/sms/sms.aspx?uid=
hey use this code on ur code k
ReplyDeleteHttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://moneycentral.msn.com/investor/StockRating/srstopstocksresults.aspx?sco=1&page=1col=13" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=way2sms");
That code Run Successfully but Sms Not Delivered to the Recipient
Deleter u got the application now
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteyes i am not receiving the message in mobile..
ReplyDeleteI THINK ITS SERVER DOWN PROBLEM
ReplyDeletebut when i am sending through way2sms i am receiveing the sms please help..
ReplyDeleteHi this is chakradhar can u help me how to send sms through way2sms
ReplyDeletehello sir your code is working fine but SMS not get me on my number..
ReplyDeletehello sir ,can u send me code,i am not getting message on mobile no and not getting any error so plz send me code on my email id
ReplyDeletethis code is working but SMS not sent on mobile..please help its very urgent
ReplyDeleteIS it take time to recieve sms
ReplyDeleteI have use same code as mentioned above....
ReplyDeleteBut getting mentioned below error--
"Error Occured!!!System.Net.WebException: The remote name could not be resolved: 'ubaid.tk' at System.Net.HttpWebRequest.GetResponse() at Message.send(String uid, String password, String message, String MobNo) in d:\User\test\Message.aspx.cs:line 22 at Message.buttonSend_Click(Object sender, EventArgs e) in d:\Ayush\test\Message.aspx.cs:line 40".
Kindly get resolve this....
I don't get any sms to my mobile, but i got sms sent successfully when i run this page.
ReplyDeletei got sms sent succesful message not delevered
ReplyDeleteplz i want soure code ... plz my mail id swetha8264@gmail.com
ReplyDeletesir the code ran.. without showing error eventhough i didnt get any message my number.. what is the reason sir.. is there any valid code pls send me
ReplyDeleteemail: chithhu15493@gmail.com
i got message sent but not got it
ReplyDeletepls replay source code
nitingadade15@gmail.com