0

I am currently working on a web application for the University that I currently work at. My issue is that I am looking for information on how to create a reactive user input file for the web system. We are using asp.net and c# in visual studio 2017 currently. I am not totally sure the best way to word this, so here is my attempt.

Basically what I need to do is have a couple boxes of questions for user input. So for now lets say 3 boxes on the same view. The first box asks what specific campus the employee is working at, the second asks what department, and the third asks what type of access they are requesting. I need these to be able to change(simplify) as the user goes on. So for example if they choose "off campus" in the campus box and then "Ricoh-Consultant" in the dept. tab(second box), the third box(access requested) will simplify the choices available depending on their first and second choices to make it more user friendly.

Does anyone have any idea or recommendations where I should look to learn this process? Thanks in advance!!

Rand Random
  • 7,300
  • 10
  • 40
  • 88
Chester S.
  • 73
  • 1
  • 2
  • 10

2 Answers2

2

Well, from the sounds of it, you are looking to create a simple form with dynamic dropdowns. I believe you have two options depending on how you'd like to proceed:

  1. Create an onChange event listener in javascript/jQuery that makes an AJAX call to populate the next dropdown on change. See here (don't worry that it says PHP, the Javascript is the important part):

How to populate dependable drop-down using Ajax and php

  1. Use .NET FieldTemplates on your form to listen to the changes and populate the next dropdowns:

MSDN Field Templates

I personally, if given the choice, would choose option #1, but this gives you two avenues to go down. Hope it helps.

Ryan C
  • 572
  • 5
  • 18
2

You have to make a postback or an ajax request with treatments via javascript, every time a user selects the box. Each post will have to return or refresh the other box data by the filter of the already selected boxes.

Here are some examples at Code Project and a question made at MSDN.

Guilherme Holtz
  • 474
  • 6
  • 19