Results 1 to 8 of 8

Thread: how to send sms through asp.net with c#?

  1. #1
    Join Date
    Jan 2009
    Posts
    8

    how to send sms through asp.net with c#?

    How to send sms through asp.net with c# using some gateway(clickatell)?
    anyone pls help me.. I have to include that part in my final year project.. I visited lots of websites, tutorials and all.. but nothing helped me. pls anyone guide me..

  2. #2
    Join Date
    Jun 2006
    Posts
    623

    Re: how to send sms through asp.net with c#?

    Try e-mailing the message to PHONENUMBER@CARRIERNAME.COM.

    For instance, in the USA, if you wanted to text 212-555-1212, a verizon wireless customer, you could just send an e-mail to 2125551212@vtext.com and it will convert your e-mail into an SMS message to the phone.

    Now, let's suppose you don't know what carrier the person belongs to (maybe Cingular, maybe sprint)... you just drop the message to all of them and let 2 of them bounce!

  3. #3
    Join Date
    May 2008
    Posts
    308

    Re: how to send sms through asp.net with c#?

    Hi,

    To send sms through asp.net with c# :

    1) You can install a GPRS modem on the sending machine and send through the modem

    2) You can use a public (for pay) webservice and send your messages that way.

    3) You can use a free service like teleflip.com to send messages for free, and accept the fact that they will imprint a sponsor message at the bottom of each message you send. Teleflip.com is very simple, you just send an email to <userphonenumber>@teleflip.com and they take care of everything regardless of the carrier.

  4. #4
    Join Date
    May 2008
    Posts
    3,971

    Re: how to send sms through asp.net with c#?

    Here is the sample code for sending SMS.

    Code:
    private void Send_Click(object sender, System.EventArgs e)
    {
        try
        {
            SmsTest.net.webservicex.www.SendSMS smsIndia= 
                  new SmsTest.net.webservicex.www.SendSMS();
            SmsTest.com.webservicex.www.SendSMSWorld smsWorld =  
             new SmsTest.com.webservicex.www.SendSMSWorld();
            if(rdoType.SelectedValue == "1")
                smsIndia.SendSMSToIndia(txtMobileNo.Text.Trim(), 
                        txtEmailId.Text.Trim(), txtMessage.Text);
            else 
                smsWorld.sendSMS(txtEmailId.Text.Trim(), 
                        txtCountryCode.Text.Trim(), 
                        txtMobileNo.Text.Trim(), txtMessage.Text);
            lblMessage.Visible = true;
            lblMessage.Text="Message Send Succesfully";
        }
        catch(Exception ex)
        {
            lblMessage.Visible = true;
            lblMessage.Text="Error in Sending message"+ex.ToString();
        }
    }
    
    private void rdoType_SelectedIndexChanged(object sender, System.EventArgs e)
    {
        if(rdoType.SelectedValue =="1")
            txtCountryCode.Enabled = false;
        else
            txtCountryCode.Enabled = false;
    }

  5. #5
    Join Date
    Jan 2009
    Posts
    8

    Re: how to send sms through asp.net with c#?

    While executing i am getting the foll error:


    The type or namespace name SmsTest could not be found(you are missing a directive or an assembly reference?).

    How to solve this error?

  6. #6
    Join Date
    Jan 2009
    Posts
    8

    Re: how to send sms through asp.net with c#?

    What is the carrier name for Airtel (TamilNadu)?

  7. #7
    Join Date
    Feb 2011
    Posts
    1

    Re: how to send sms through asp.net with c#?

    @cute girl.....
    you have to inclue proper header file....

  8. #8
    Join Date
    Jan 2006
    Posts
    605

    Re: how to send sms through asp.net with c#?

    Quote Originally Posted by cute_girl View Post
    What is the carrier name for Airtel (TamilNadu)?
    You can insert into carriers (name, numeric, mcc, mnc, apn, user, server, password, proxy, port, mmsproxy, mmsport, mmsc, type, current) VALUES ('Airtel', '40494', '404', '94', 'airtelgprs.com', '*', '', '*', '', '', '', '', 'null', 'default', 1);

    And to solve the issue of the error message you are getting, you can follow the below example codes.

    Code:
    private void Send_Click(
    object sender, System.EventArgs e)
    {
    try
    {
    SmsTest.net.webservicex.www.SendSMS smsIndia=
    new SmsTest.net.webservicex.www.SendSMS();
    SmsTest.com.webservicex.www.SendSMSWorld smsWorld =
    new SmsTest.com.webservicex.www.SendSMSWorld();
    if(rdoType.SelectedValue == "1")
    smsIndia.SendSMSToIndia(txtMobileNo.Text.Trim(),
    txtEmailId.Text.Trim(), txtMessage.Text);
    else
    smsWorld.sendSMS(txtEmailId.Text.Trim(),
    txtCountryCode.Text.Trim(), txtMobileNo.Text.Trim(),
    txtMessage.Text);
    lblMessage.Visible = true;
    lblMessage.Text="Message Send Succesfully";
    }
    catch(Exception ex)
    {
    lblMessage.Visible = true;
    lblMessage.Text="Error in Sending message"+ex.ToString();
    }
    }
    
    private void rdoType_SelectedIndexChanged(
    object sender, System.EventArgs e)
    {
    if(rdoType.SelectedValue =="1")
    txtCountryCode.Enabled = false;
    else
    txtCountryCode.Enabled = false;
    
    }

Similar Threads

  1. Replies: 4
    Last Post: 27-02-2011, 04:32 AM
  2. Replies: 5
    Last Post: 18-02-2011, 10:07 PM
  3. How to use Net Send command to Send Message
    By superway in forum Windows Software
    Replies: 1
    Last Post: 15-12-2010, 03:35 PM
  4. Replies: 5
    Last Post: 21-07-2010, 01:26 AM
  5. Send a fax from a pc
    By pelvis in forum Networking & Security
    Replies: 4
    Last Post: 02-04-2009, 12:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,436,541.39029 seconds with 17 queries