user2132742
user2132742

Reputation: 17

Problems in sending SMS to mobile using ASP .NET

I am doing a project on MOBILE ADVERTISING.Im using a following code in which I have to send ads to the user in the form of msg to mobile.This is the code Im using-

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net;
using net.webservicex.www;


public partial class msg : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {


            net.webservicex.www.SendSMS smsIndia = new net.webservicex.www.SendSMS();


            smsIndia.SendSMSToIndia(Txt_Mobile.Text, TxtEmail.Text.Trim(), TxtMessage.Text);


            Label3.Visible = true;
            Label3.Text = "Message Send Succesfully";
        }
        catch (Exception ex)
        {
            Label3.Visible = true;
            Label3.Text = "Error in Sending message" + ex.ToString();
        }
    }

}

There is a error showing for "net" the error is The type or namespace name 'net' could not be found (are you missing a using directive or an assembly reference?)

Im desparetly looking for a solution.. Please Help...-(

Upvotes: 0

Views: 469

Answers (1)

Jayeshkumar Sojitra
Jayeshkumar Sojitra

Reputation: 2511

I think you are using webservice only. So I think you are missing that thing.

You can follow the following steps.

Right click on the project -> Add Web Reference -> Write the URL Of the SMS service which you are using.

I think by applying this method I am sure you will solve your problem.

Upvotes: 1

Related Questions