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