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
0 OriginalGriff 534
1 Gihan Liyanage 298
2 RyanDev 260
3 Sergey Alexandrovich Kryukov 223
4 Richard Deeming 185
0 Sergey Alexandrovich Kryukov 8,936
1 OriginalGriff 7,891
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100