473,500 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to bind data in DropDownList boxfrom previous form

44 New Member
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.
Mar 21 '08 #1
1 1377
balabaster
797 Recognized Expert Contributor
This question has already been previously posted:

http://www.thescripts.com/forum/thread784615.html
Mar 21 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2330
by: Carlos | last post by:
I have a dropdown list that binds data from a data reader bo I have a second dropdown list in my wen form which I want to have same data, how can I copy the one is bind to a secopnd one.. see my...
2
1647
by: GG | last post by:
I have a typical ASP page with a dropdownlist web form control. I want this to auto-populate from a column in a sql table. I've tried dragging a sql connection data control onto the form, played...
2
1688
by: Jim in Arizona | last post by:
Being new, i experiment a lot and usually get results I'm not hoping for. My current problem is reading from a SQL 2000 table and populating an ASP dropdownlist with a column from the table. The...
2
2123
by: COHENMARVIN | last post by:
I'm leafing through a big book on asp.net, and I don't see any way to the following: 1. bind values and text to a dropdown 2. Also make the first line of the dropdown say something different. For...
1
1821
by: mr2_93 | last post by:
Hi All, I am new to ASP.NET and I am looking for help with the dropdownlist data control. I wonder if someone could show me how to past the SelectedValue of a data-bind dropdownlist to...
2
9567
by: Thor W Hammer | last post by:
Is it possible??
1
4272
by: Patrik Zdarsa | last post by:
Hi, I'm try VS 2005 and need UPDATE database record in viewform, all working when every filed is type TextBox (html INPUT) but I need change one TextBox to Listbox or dropdownlist and read data...
4
29511
by: Dabbler | last post by:
I have two tables I'm editing in a Gridview. The VANS table contains a key to the other LESSOR table. I would like to use a dropdown list to select the LessorId value while displaying the Lessor...
3
3142
by: sck10 | last post by:
Hello, I am trying to bind an arraylist to a FormView DropDownList control in the PreRender state. The error that I get is the following: Databinding methods such as Eval(), XPath(), and...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7232
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.