Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I want to fill list box values based on a condition.
in my sql server table there are fields lot_sold(list Box),Auction_Date(text box),registration no(ddl)
now from web form user first select Auction_date according to this date lot_sold for that Auction date are to be filled in list box lot (lot_code are multiple for that date).

how i achieve this please help.
Posted

1 solution

Look at AutoPostBack [^] and OnChange of your Auction Date control.

Basically you need to attach to the OnChange event of the Auction Date Control, when that changes you just need to query the database and pull out the details for the given date and populate your list box like you normally would.

**** EDIT ****
Oh yeah, when you are in your OnChange event you can access the value of what ever control you are using to select the auction date by looking at the corresponding property for that control
 
Share this answer
 
v2
Comments
ruby kaur 6-Dec-12 23:24pm    
please explain with example,
i am using textbox control for auction date and it is having ajax clender control to select date,and my lotcode is multiselect listbox.
on selection of date by user the list box has to be filled with all the lotcode of that auction date.

pls help me out.
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900