Click here to Skip to main content
11,412,833 members (73,369 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
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 29-Jan-13 21:43pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
Söderlund at 30-Jan-13 3:07am
   
Or google XmlHttpRequest.
However, i think your solution describes the easiest way to solve his question.
2012programmer at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  

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

  Print Answers RSS
0 OriginalGriff 379
1 Sascha Lefévre 200
2 Maciej Los 150
3 ProgramFOX 130
4 Sergey Alexandrovich Kryukov 110
0 Sergey Alexandrovich Kryukov 9,025
1 OriginalGriff 7,317
2 Maciej Los 3,570
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web01 | 2.8.150427.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2015
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