Announcement

Collapse
No announcement yet.

asp.net help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • asp.net help

    Okay, so

    I have 2 dropdownlists on my page. both dropdownlists are bound to data in a database. Now I have a datasource, but I want it so that if you select a subject in the first dropdownlist, another dropdownlist gets visible with the different dates of the courses.

    cboOndedrwerpen are subjects.

    now the only problem is, when I select a subject, the other subjects dissapear from the dropdownlist, because the datasource gets filtered and it will stay filtered, how can I make it so that everytime I pick a subject the dropdownlist gets filled with all subjects again?

    Do you think I should use a datareader?



    ProtectedSub cboOnderwerpen_databound(ByVal sender AsObject, ByVal e As System.EventArgs) Handles cboOnderwerpen.SelectedIndexChanged
    Me.dtsOnderwerpen.FilterExpression = "onderwerp= '" & Me.cboOnderwerpen.SelectedValue.ToString & "'"
    dteGegevens.Visible = True
    EndSub


    EndSub
    ProtectedSub cboDatum_SelectedIndexChanged(ByVal sender AsObject, ByVal e As System.EventArgs) Handles cboDatum.SelectedIndexChanged
    Me.dtsOnderwerpen.FilterExpression = "datum= '" & Me.cboDatum.SelectedValue.ToString & "'"
    EndSub
    Last edited by duel pasta; 02-26-2008, 06:12 AM.
    help: (how do i shot) (Public 0): how do i travel diagonally? i only have up, down, left and right keys.

    4:PinkSTAR <ER>> ask DP he knows me inside and out

  • #2
    Are you submitting the form after selecting the first value?
    USA WORLD CHAMPS

    Comment


    • #3
      Well, I just want to show the future courses in a dropdownlist and sometimes one course has more dates so I want them to first select a course then a date but the filtering is a pain in the ass. If they have selected the subject and the date they have to fill in their name and their department then they click a button to sign up for it. I've tried to load the page again when they select a subject but then my datesource will not be filtered anymore so it doesnt show the information of the selected course in the formview :P

      Hope that makes sense
      help: (how do i shot) (Public 0): how do i travel diagonally? i only have up, down, left and right keys.

      4:PinkSTAR <ER>> ask DP he knows me inside and out

      Comment

      Working...
      X