hi thanks for ur reply i did try what u recommended but i still keep on getting the error - Cast from string "31/6/2004" to type 'Date' is not valid.
i keep on getting the error cause since i am putting the values that i have in the three dropdownlists into a string and then passing it to datetime variable it brings this error that i have mentioned above.
the error is cropping up in the code below where i have the "a" declared as datetime. its not accepting the string of "mydate" variable to be put into the textbox
Visual Basic:
Dim a1 As Integer = ddlMonth.SelectedIndex
If ddlDay.SelectedValue = "31" Then
If a1 = 1 Or a1 = 3 Or a1 = 5 Or a1 = 8 Or a1 = 10 Then
Response.Write("<script>alert('Invalid Date')</script>")
End If
End If
Dim mydate As String
mydate = ddlDay.SelectedItem.Text + "/" + ddlMonth.SelectedItem.Text + "/" + ddlYear.SelectedItem.Text
Dim a As DateTime = mydate
textbox1.text = a
do u know how i can go around this.. thanks in advance..