Skip to main content

Send Sms Message source code in C# ASP .NET using API provider

Send SMS through the your developed project by just adding the following code.


Just write the following code on button click of the send button.

String CompleteUrl = "http://enterprise.smsgupshup.com/GatewayAPI/rest?msg=" + msg + "&v=1.1&userid=****&password=****&send_to=" + nu + "&msg_type=text&method=sendMessage";
        WebRequest request = WebRequest.Create(CompleteUrl);
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        StreamReader reader = new StreamReader(response.GetResponseStream());
        string result = reader.ReadToEnd(); 
// This will contain the status of message e.g. failed, ok etc.
        lbl_msg.Text = result.ToString();

I hope this code will help you........................

Comments

Popular posts from this blog

Resolving 'Setup Account Privileges' error while installing SQL Server

A new installation of Microsoft SQL Server 2012 or Microsoft SQL Server 2008 R2 fails You see the following error message when you try to install a new instance of SQL Server 2012 or SQL Server 2008 R2: Rule "Setup account privileges" failed.

Creating package in Oracle Database using Toad For Oracle

What are Packages in Oracle Database A package is  a group   of procedures, functions,  variables   and  SQL statements   created as a single unit. It is used to store together related objects. A package has two parts, Package  Specification  and Package Body.