Click here to Skip to main content
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 Marcin Kozub 275
1 OriginalGriff 249
2 Sergey Alexandrovich Kryukov 215
3 Praneet Nadkar 197
4 Richard MacCutchan 182
0 OriginalGriff 8,048
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 30 Jan 2013
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