Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Send SMS in Asp.Net
WhatsApp
Pintoo Yadav
Dec 16
2014
2.6
k
0
1
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
Up Next
How to Send SMS in Asp.Net