Hi Friends
I have designed a form with 1 DropDownList box named “ddlShow_time”& the form name is “Default4.aspx”. Just like that, I have the database(SQL SERVER 2000) as
Table Name: ShowTime
-----------------------------------------------------------------------------
Theater_Name ShowTime Movie_Name
-------------------------------------------------------------------------------
Udhayam 10:00am Billa
Udhayam 2:30am Kalluri
Udhayam 6:30pm Billa
Udhayam 10:00pm Kalluri
Devi 10:00am Pidichirukku
Devi 2:30am Jodha Akbar
Devi 6:30pm Pidichirukku
Devi 10:00pm Jodha Akbar
------------------------------------------------------------------------------
The thing is, when the form(“Default4.aspx”) gets loaded ,I should get the data filled in the ddlShow_time accordimg to the DropDownList boxes which I have in the previous form "Default3.aspx"
In "Default3.aspx" page, I have 2 DropDownList boxes named as ddl1 & ddl2 in which ddl1 consists of the details of the Theater & ddl2 consists of the details of the Movie. If I select the Theater in ddl1, then according to the Theater selected in ddl1, the Movies should bind on ddl2.
The Theater & Movie tables are as follows
Table Name: Theater
---------------------------------
tid tname(Theater name)
---------------------------------
t1 Udhayam
t2 Devi
t3 CiniPriya
t4 Dhanam
t5 Pallavi
---------------------------------
Table Name: Movie
---------------------------------
mid tid mname(Movie name)
---------------------------------
m1 t1 Billa
m2 t1 Kalluri
m3 t2 Pidichirukku
m4 t2 Jodha Akbar
---------------------------------
I have done this task in “Default3.aspx”. Now my problem is that,
I have to bind the data in the DropDownList box “ddlShow_time” according to the previous value selected in the DropDownList boxes(ddl1 & ddl2) in form named “Default3.aspx”.
Here I have used the query as
"SELECT showtime FROM showtime WHERE tname= '" & ddl1.SelectedValue & "' and mname='" & ddl2.SelectedValue & "'"
But this is not working.