problem faced using aspx calender
Hi, i was having problem with the aspx calender whereby the i can't retrieve only the sunday ticket price from the database. However the rest of the day is can manage to retrieve it.
Here is my vb coding:
Private Sub Calender_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calender.SelectionChanged
lblDateSelect.Text = Calender.SelectedDate
Dim S_Date As Date
S_Date = lblDateSelect.Text
Session("Date") = lblDateSelect.Text
dbconn = connectToDB()
Dim weekday_value
weekday_value = Weekday(lblDateSelect.Text) - 1
objCmd.commandtext = "spDateChecking"
objCmd.CommandType = CommandType.StoredProcedure
objCmd.connection = dbconn
objParam = objCmd.Parameters.Add("RETURN_VALUE", SqlDbType.Int)
objParam.Direction = ParameterDirection.ReturnValue
objCmd.Parameters.Add("@SlotDateID", weekday_value)
Dim myReader As OleDbDataReader
myReader = objCmd.ExecuteReader
While myReader.Read = True
lblTicketPrice.Text = myReader("SlotPrice")
TicketPrice = lblTicketPrice.Text
End While
'Close the connection object
dbconn.Close()
end sub