• Sales:
  • smppsms.preety
  • +91 9712724242
  • mkt@smppsmshub.in
  • Support:
  • +91 9712728468
  • support@smppsmshub.in

Send SMS with ASP.NET C# Script

ASP SMS messaging is one of the services we offer. Here we'll show you how to use our SMS gateway in ASP. Take the SMS ASP script code below to send SMS via Developers' Central. Simply register for an account, and you will automatically receive 10 FREE SMS credits to try our service.

Code to send SMS in ASP :
using System
using System.IO
using System.Net
using System.Text
using System.Web
string sAPIKey= "APIKEY";
string sNumber = Session["Mobile"].ToString();
string sMessage = "Test SMS From Our Company";
string sSenderID = "WEBSMS";
string sChannel="promo";
string sRoute="15";
string sURL = "http://smppsmshub.in/api/mt/SendSMS?APIKEY="+sAPIKey+"&senderid="+sSenderID+"&channel="+sChannel+"&DCS=0&flashsms=0&number="+sNumber+"&text="+sMessage+"
string sResponse = GetResponse(sURL);
public static string GetResponse(string sURL)
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sURL);
request.MaximumAutomaticRedirections = 4;
request.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse response = (HttpWebResponse)request .GetResponse();
Stream receiveStream = response.GetResponseStream(
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
string sResponse = readStream.ReadToEnd();
return sResponse;
catch(Exception ex)
return ex.tostring();