473,563 Members | 2,767 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.a spx"

In "Default3.a spx" 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.SelectedVa lue & "' and mname='" & ddl2.SelectedVa lue & "'"

But this is not working.
Mar 21 '08 #1
1 1383
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
2337
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 code below it dos not work.. Thanks try {
2
1648
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 with data binding, everything! I'm sure this is easy, can anyone point out the steps I need to take? Thanks ...
2
1699
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 only thing displayed in the DropDownList is: System.Data.Common.DbDataRecord So, under the Page_Load Event, here's my code: Dim strSQL,...
2
2140
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 instance, if I'm working with a table of hotels, I might want a 'select' control as follows <select id="mylistbox" runat="server"> <option...
1
1833
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 poplulate a second data-bind dropdownlist. For example, the first dropdownlist contains a list of companies and the second dropdownlist displays a...
2
9570
by: Thor W Hammer | last post by:
Is it possible??
1
4280
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 from another table and store it in table1 in parameter "stav". Load data to ListBox is not problem but when I try update record there is error "stav...
4
29522
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 table's "Company" field as text. When I commit the edit I get error:Must declare the scalar variable "@LessorId". Also as a bonus question ;) I...
3
3145
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 Bind() can only be used in the context of a databound control. Any help with this would be appreciated. -- Thanks in advance,
0
7665
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.