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. Viktor Tachev
    Viktor Tachev avatar
    1440 posts

    Posted 15 Oct 2015 Link to this post

    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.

    Viktor Tachev
    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
  3. DevCraft R3 2016 release webinar banner
Back to Top