Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NET
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 6-Dec-12 7:55am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
v2
Comments
ruby kaur at 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)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Shai Vashdi 576
1 OriginalGriff 183
2 Tadit Dash 160
3 Sergey Alexandrovich Kryukov 136
4 praveen_07 115
0 Sergey Alexandrovich Kryukov 9,280
1 OriginalGriff 5,473
2 Peter Leow 4,100
3 Maciej Los 3,540
4 Abhinav S 3,333


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 6 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid