This is a migrated thread and some comments may be shown as answers.

Implement ajax on few parts of a form based off of a selected answer?

1 Answer 7 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Auromita
Top achievements
Rank 1
Auromita asked on 13 Oct 2015, 07:23 PM

I have created a large form which I wanted to implement Ajax on some parts. I am very new to Ajax and ASP.NET and was wondering how I should go about it.

The questions are mostly "yes" or "no" RadComboBox selections except one with the "other" option. There is one part of the form where if the user selects "yes" then a checkbox will appear. If the user selects "no" then the checkbox will not be visible to them. In another part if the user selects "yes" there is another question that will appear right below, and if they select no then it will stay hidden.In the last part of the form that needs implementation if the user selects "yes" a textbox will appear, if they select "no" a checkbox will appear, and if they select "other" a different textbox will appear.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 16 Oct 2015, 12:02 PM
Hello Auromita,

Thank you for contacting Telerik Support.

I am not quite sure about what exactly is your questions. Could you please elaborate a bit more on the matter, so we could address your inquiry appropriately?

If you wondering about, you to manage the visibility of the subsequent controls on your form, base on the selected of the ComboBox in question, I would advise you to use the OnSelectedIndexChanged event of the control, in order to use the handler to set the Visible property of the other controls.

In the attachment you can find a simple example on how this could be achieved. You can create a simple if-else block, where you can manage the visibility of the controls, base on the selection of the ComboBox.

Hope this information helps.

Regards,
Nencho
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Ajax
Asked by
Auromita
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or