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 18 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:24 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
Viktor Tachev
Telerik team
answered on 15 Oct 2015, 02:26 PM
Hi Auromita,

In order to implement the behavior you could use server-side logic. However, making a roundtrip to the server to show a TextBox or a CheckBox control seems unnecessary.

I would recommend using client-side logic to show the controls. You can hide the TextBox/CheckBox controls initially. Then you should handle the client  OnClientSelectedIndexChanged event for the RadComboBox and show the relevant control.

Regards,
Viktor Tachev
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
Viktor Tachev
Telerik team
Share this question
or