TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to Send SMS in Asp.Net
Pintoo Yadav
Dec 16
2014
Code
2.6
k
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
public
void
sms()
{
string
uname =
"####123"
;
string
pass =
"####f543"
;
string
send =
"PCSCRAFT"
;
// string dest = ddlselectid.Text;
string
dest = txtbomile.Text;
//string msg = txtMessage.Text;
// string msg = "Thank your for completion of registration. Registered ID: " + txtbomile.Text.Trim() + " Kindly us registration ID for further process";
string
msg =
"Thank your for completion of registration. Registered ID: "
+ lblid.Text.Trim() +
" Kindly us registration ID for further process"
;
string
schtm = System.DateTime.Now.ToString(
"yyyy-MM-dd HH:mm"
);
//string priority="1";
//string schtm = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm");
string
sURL;
StreamReader objReader;
//http://103.247.98.91/PRPAPI/PrpApiSendMsg.aspx?uname=20120003&pass=123456&send=PROMO&dest=9835613280&msg=hi&priority=1&schtm=2013-04-14 11:22
sURL =
"http://103.247.98.91/API/SendMsg.aspx?uname="
+ uname +
"&pass="
+ pass +
"&send="
+ send +
"&dest="
+ dest +
"&msg="
+ msg +
"&priority=1&schtm="
+ schtm;
//http://103.247.98.91/PRPAPI/PrpApiSendMsg.aspx?uname=20120003&pass=123456&send=PROMO&dest=9835613280&msg=hi&priority=1&schtm=2013-04-14 11:22
// sURL = "http://110.234.113.233/SendSMS/sendmsg.php? uname=" + uname + "&pass=" + pass + "&send=" + send + "&dest=" + dest + "&msg=" + msg;
WebRequest wrGETURL;
wrGETURL = WebRequest.Create(sURL);
try
{
Stream objStream;
objStream = wrGETURL.GetResponse().GetResponseStream();
objReader =
new
StreamReader(objStream);
objReader.Close();
// Response.Write("Done");
}
catch
(Exception ex)
{
ex.ToString();
}
}
Send SMS
Send SMS in Asp.Net
Code for Send SMS in Asp.Net