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
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ej Rodrigo
NA
1
717
This is my code for c# web application , pls help me ..
Jul 27 2015 12:28 AM
This code is running , but it can't send a message in my whats app using c# asp.net web application ..
Can anyone here help me plz ?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WhatsAppApi;
namespace WebApplication3
{
public partial class _Default : System.Web.UI.Page
{
protected void btnSend_Click(object sender, EventArgs e)
{
string from = "+639061714515";
string to = txtTo.Text;
string msg = txtMessage.Text;
WhatsApp wa = new WhatsApp(from, "9+gmQ0wGCCl/o1tb/RpOJqYCHgw=", "Ej", false, false);
wa.OnConnectSuccess += () =>
{
MessageBox("Connected to WhatsApp ...");
wa.OnLoginSuccess += (phoneNumber, data) =>
{
wa.SendMessage(to, msg);
MessageBox("Message Sent...");
};
wa.OnLoginFailed += (data) =>
{
MessageBox("Login Failed:");
};
wa.Login();
};
wa.OnConnectFailed += (ex) =>
{
MessageBox("Connection Failed...");
};
wa.Connect();
}
public void MessageBox(string MessageBox) {
Page.ClientScript.RegisterStartupScript(Page.GetType(), "Message Box", "<script language='javascript'>alert('" + MessageBox + "')</script>");
}
}
}
Reply
Answers (
0
)
how to make comment post tool for youtube video use API v3?
Downloading video from website in asp.net C#