string api = "http://demo.bsmart.in/SmartSendSMS.jsp?usr=@usr&pass=@pass&sid=@sid&msisdn=@msisdn&msg=@msg";
// setting up require paramaters
// you can store this sensitive data (credentials) in to database or web.config and fetch
string user = "Your_User_Name";
string password="Your_Password";
string sid = "Your_Sender_ID";
string msisdn = "91980098900" // txtMobile.Text.Trim();
// encode the message to pass over http
string message = HttpUtility.UrlEncode("This is my test message");
//Buliding API with message and credentials
api = api.Replace("@usr",user).Replace("@pass",password).Replace("@sid",sid).Replace("@msisdn",msisdn).Replace("@msg",message);
// WebProxy proxy = new WebProxy("192.168.1.100",3321);
//uncomment below code if it requires credentials to access your network and update required
//NetworkCredential credentials = new NetworkCredential("UserNAme","Password")
//proxy.Credentials = credentials;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(api);
// request.Proxy = proxy;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
// Display transaction ID which will be used later for tracking sms status.
Label1.Text = reader.ReadToEnd();
reader.Close();