[HttpPost]
public ActionResult SendMessage()
{
// TheTextingDemo.Models.ConfigurationSettings s1 = new Models.ConfigurationSettings();
// string API_KeY = s1.API_KEY;
string API_KEY = "wwpiub49a1";
string API_SECRET = "j5hsuadzdd";
string TO = "923215029981";
string Message = "Hello world";
string sURL;
StreamReader objReader;
//string ssurl="https://www.thetexting.com/rest/sms/json/message/send?api_key=wwpiub149a1&api_secret=j5hsuacmdzdd&to=923215029981&text=Hello"
sURL = "https://www.thetexting.com/rest/sms/json/message/send?api_key=" + API_KEY + "&api_secret=" + API_SECRET + "&to=" + TO + "&text=" + Message;
WebRequest wrGETURL;
wrGETURL = WebRequest.Create(sURL);
try
{
Stream objStream;
objStream = wrGETURL.GetResponse().GetResponseStream();
objReader = new StreamReader(objStream);
objReader.Close();
}
catch (Exception ex)
{
ex.ToString();
}
return RedirectToAction("SendSMS");
}
Hi I want to call a simple Method of sending sms from my simple View having some parameters i have written the method but when i am calling it says the resources could not found i do not want to create a view ans show it on submit i just want a method call and the view should remain the same.my method is in home controller with name SendMessage
What i have tried
but it says the resource not found and method did not called
Catcher WongPosted Feb 4, 2017, 8:48 PM
Mark TaborPosted Feb 4, 2017, 12:00 PM
Danish HabibPosted Feb 4, 2017, 8:51 AM
Catcher Wong
You solution worksCatcher WongPosted Feb 4, 2017, 7:50 AM
Catcher WongPosted Feb 4, 2017, 6:59 AM
Catcher WongPosted Feb 3, 2017, 7:18 PM
Afzaal Ahmad ZeeshanPosted Feb 3, 2017, 4:37 PM
Danish HabibPosted Feb 3, 2017, 2:26 PM