Nathan

Nathan

  • NA
  • 24
  • 15.5k

Error in Application to send Message to Mobile Phone in C#

Feb 28 2014 7:41 AM
Sir, I am in a windows application function  to send message  into mobile phone.
 
the code below colored red not hitting by the breakpoint, why?( the username and password and sender name has been hided by me)
 
The variables, to and msg has values.
 
My c# code is:-
 
private void SendAfterBookingSMS()
{
try
{
WebClient client = new WebClient();
string to, msg;
to = grdBooking.Sheets[0].Cells[grdBooking.Sheets[0].ActiveRowIndex, 8].Text.ToString();
msg=grdBooking.ActiveSheet.Cells[grdBooking.ActiveSheet.ActiveRowIndex, 9].Text.ToString();
string baseUrl = "http://bulksms.mysmsmantra.com:8080/WebSMS/SMSAPI.jsp?username=xxxxxx&password=xxxxxx&sendername=xxxx&mobileno='"+to+"'&message='"+msg+"'";
client.OpenRead(baseUrl);
}
catch (Exception)
{

throw;
}

Answers (2)