Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Programmers,
I am making a student registration form for a computer institute. In which I have two dropdown lists, one is for lecturetimings and another is for availablecourses. I made two tables in database 1 table will save all the information of student when he clicks on submit, another is courses table.
The structure of courses table is:
lectTime ----------SoftwareLab-----------HardwareLab
MondayAM-------MSoffice---------------NULL
TuesdayAM-------C-Language------------BasicHardware
WednesdayAM----MSoffice---------------CCNA
MondayPM-------VisualBasic------------Null
ThursdayPM-----Null-------------------Basic Hardware

In my first dropdown list(i.e "lecturetimings") I have all my lecture timings(MondayAM, TuesdayAM,WednesdayAM, MondayPM and ThursdayPM). Now my requirement is if a user selects any lecturetimings-for Ex:MondayAM, then in another dropdown list it should available course(MS-office), if selectes TuesdayAM then it should show two values(C-Language, BasicHardware).

And another requirement is in my register table it should not allow to insert more than 20 records for each course of each day.(For example MondayAM-MSoffice only 20 students are allowed, TuesdayAM-C-Language 20 students and BasiHardware 20 students allowed).

Anyone kindly solve this with the code.

Thanks in advance
Posted

You could need Cascading Dropdown scenario. One way to do that is using Ajax Control Toolkit. Have a look here: http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/CascadingDropDown/CascadingDropDown.aspx[^]
 
Share this answer
 
Comments
Per Söderlund 30-Jan-13 3:07am    
Or google XmlHttpRequest.
However, i think your solution describes the easiest way to solve his question.
2012programmer 30-Jan-13 3:44am    
Using ajax is looking difficult for me, is there any way to do this. another requirement is stop submitting if there 20 records per a course each day.
 
Share this answer
 

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