ASPX CODE
<%@
Page Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default"
%>
<!DOCTYPE
html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml">
<head
id="Head1"
runat="server">
<title>Send
Sms</title>
</head>
<body>
<form id="form1"
runat="server">
<div>
<asp:Label
ID="Label1"
runat="server"
Text="Mobile No"></asp:Label>
<asp:TextBox
ID="TextBox1"
runat="server"></asp:TextBox>
<br
/>
<asp:Label
ID="Label2"
runat="server"
Text="Message"></asp:Label>
<asp:TextBox
ID="TextBox2"
runat="server"
TextMode="MultiLine"></asp:TextBox>
<br
/>
<asp:Button
ID="Button1"
runat="server"
Text="Send Sms"
onclick="Button1_Click"
/>
</div>
</form>
</body>
</html>
CS Code
using
System;
using
System.Configuration;
using
System.Data;
using
System.Linq;
using
System.Web;
using
System.Web.Security;
using
System.Web.UI;
using
System.Web.UI.HtmlControls;
using
System.Web.UI.WebControls;
using
System.Web.UI.WebControls.WebParts;
using
System.Xml.Linq;
using
System.Net;
public
partial class
_Default : System.Web.UI.Page
{
string uid;
string password;
string message;
string no;
protected void Page_Load(object
sender, EventArgs e)
{
}
//This is the code of API for sending message.
public void send()
{
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid="
+ uid + "&pwd=" + password +
"&msg=" + message +
"&phone=" + no +
"&provider=fullonsms");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader
respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString =
respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
}
protected void Button1_Click(object
sender, EventArgs e)
{
try
{
uid =
"";
password =
"";
message =
TextBox2.Text;
no =
TextBox1.Text;
send();
TextBox2.Text =
"";
TextBox1.Text =
"";
}
catch (Exception
ex)
{
ex.Message.ToString();
}
}
Noufal kpPosted Apr 16, 2016, 5:15 AM
but i have allready account in full on sms but it cant work properly
Noufal kpPosted Apr 16, 2016, 4:53 AM
Is there any code instead of commented line of above code??
Anurag SarkarPosted Oct 14, 2013, 9:39 AM
It will work for all service providers
rajkumar tamilselvanPosted Oct 14, 2013, 9:16 AM
are u sure its working on airtel providers.. i heard..government stopped these free sms service
nigam pattaPosted Sep 12, 2013, 8:41 AM
Hello Boss ,this is working well and good for Airtel Providers only.Other than airtel Is Not Working .Help me regarding this.
Purushottam RathorePosted May 31, 2013, 1:32 AM
I%20have%20already%20registered%20on%20fullonsms.com%20but%20unable%20to%20send%20sms%20by%20using%20this%20code.
Anurag SarkarPosted May 28, 2013, 4:09 AM
Hi%20you%20should%20create%20your%20acoount%20in%20FullOnSms%20then%20on%20UId%20you%20can%20put%20your%20no%20and%20password%20will%20be%20sent%20to%20you.
Kavi sujaPosted May 27, 2013, 8:28 AM
I%20check%20this.I%20create%20web%20application%20and%20run%20it.After%20i%20send%20SMS.But%20the%20number%20not%20receiving%20the%20message.Whether%20i
Kavi sujaPosted May 27, 2013, 8:27 AM
Hi%2C