How to send SMS to the gridview mobile numbers

Last post 11-05-2009 11:20 AM by qwe123kids. 3 replies.

Sort Posts:

  • How to send SMS to the gridview mobile numbers

    11-04-2009, 7:28 AM
    • Member
      7 point Member
    • msg4karthik
    • Member since 10-16-2009, 11:11 AM
    • Posts 48

    hi, i am creating a website, where i want to send SMS to mobile numbers on there birthday date that is store in the registration table.. Also i am having bulkSMS services to send SMS.. Also i Have pickup URL to send MSg to the numbers, Now the problem is how to collect the number on their birthday... Also i am using the following code that its display all the number in the gridview.. now i want to collect the mobile numbers and sent SMS pls help to finish this process..


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            varcon.ConnectionString = varcons.connection
            Dim dt As New DataTable()
            lbldate.Text = Date.Now.ToString("dd")
            lblmonth.Text = Date.Now.ToString("MM")

            Try
                Dim varcmd As New Data.SqlClient.SqlDataAdapter("sp_chkbirthday", varcon)
                varcmd.SelectCommand.CommandType = Data.CommandType.StoredProcedure
                Dim param As New SqlParameter
                param = varcmd.SelectCommand.Parameters.Add("@Date", Data.SqlDbType.VarChar)
                param.Value = Trim(lbldate.Text)

                param = varcmd.SelectCommand.Parameters.Add("@month", Data.SqlDbType.VarChar)
                param.Value = Trim(lblmonth.Text)

                param = varcmd.SelectCommand.Parameters.Add("@flag", Data.SqlDbType.Int)
                param.Direction = Data.ParameterDirection.Output
                varcmd.Fill(dt)
                'varcon.Open()
                If dt.Rows.Count > 0 Then
                    GridView1.DataSource = dt
                    GridView1.DataBind()
                    Response.Write("Happy Birthday to u")
                Else
                    Response.Write("Today not ur Birthday ")
                End If
            Catch ex As Exception
                Response.Write(ex.Message)
            Finally
                varcon.Close()
            End Try
        End Sub
    End Class


    Also in storeed Procedure i am using the following code:


    [sp_chkbirthday]

    (
    @Date varchar(50),
    @Month varchar(50),
    @flag int output
    )
    as

    if exists(select Date,[Month] from registration where Date=@Date and [Month]=@Month)
    Begin
    select @flag=0
    select * from registration where Date=@Date and [Month]=@Month
    end
    else
    begin
    select @flag=1
    End


    so this code is working and its also displaying the gridview of all the person who r al havingl birthday on the date that display in the page load.. now i want to sent SMS birthday SMS to that number.. please help...

    with cheers,
    msg4karthik
  • Re: How to send SMS to the gridview mobile numbers

    11-04-2009, 12:23 PM
    • All-Star
      27,319 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Mumbai
    • Posts 4,615

    Hi,

    U may have To Use some 3rd party control to send mail such cellnext,or way2sms are site..


    U have send some parameters and they will Notify about status of message send

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
  • Re: How to send SMS to the gridview mobile numbers

    11-05-2009, 12:10 AM
    • Member
      7 point Member
    • msg4karthik
    • Member since 10-16-2009, 11:11 AM
    • Posts 48

    i have third party control bulk SMS service.. i dont how to take number from the gridview and pass it to the Url.... with text msg.. i am having the url to send msg for single number.. but i have to send to all the number that was in the selected grid view.. Please help to take number from the grid view and place it in the url..

    with cheers,
    msg4karthik
    Filed under:
  • Re: How to send SMS to the gridview mobile numbers

    11-05-2009, 11:20 AM
    Answer
    • All-Star
      27,319 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Mumbai
    • Posts 4,615

    Hi,

    U may Use CommandArgument

    http://forums.asp.net/p/1168036/2214253.aspx

    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowcommand.aspx

    chk the above link for More info

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
Page 1 of 1 (4 items)