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

2 posts, 0 answers
  1. Auromita
    Auromita avatar
    2 posts
    Member since:
    Sep 2015

    Posted 13 Oct 2015 Link to this post

    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.

  2. Nencho
    Nencho avatar
    1646 posts

    Posted 16 Oct 2015 Link to this post

    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.

    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
Back to Top