How to do Ajax postback from a user control added at the runtime.

4 posts, 0 answers
  1. Deepak
    Deepak avatar
    15 posts
    Member since:
    Jun 2010

    Posted 09 Aug 2010 Link to this post

    I have a user control which I am adding to my page at the runtime.

    This controls has a Telerik dropdown which does the async  PostBack using RadAjaxPanel.

    Now to successfully make the dropdown postback work I need to add the control to the page on every post back.

    The issue is along with this control, I am adding many other controls based on SQL query in a single function.

    And all the controls do query the database to get their data which puts load on the server as well.

    So I need to know is there any better way of just doing post back and refresh on the one control which I want to on async post back from the dropdown list.

    And somehow avoid adding the all other controls again and again.

  2. Dan Miller
    Dan Miller avatar
    23 posts
    Member since:
    Jul 2010

    Posted 10 Aug 2010 Link to this post

    Just to clarify: The problem is you have a dropdown that triggers an async ajax postback on your page and reloads ALL the controls from the database, but you just want it to reload the one control?
    If this is the problem put a: if(!Page.IsPostBack) around all the controls you DON'T want to be reloaded every postback.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 Aug 2010 Link to this post

    Hi Deepak,

    Could you please elaborate a bit more on your scenario? Does the problem you are facing the one that Daniel described in the previous post. Did you test the provided suggestion? If yes what are the results from it?


    Kind regards,
    Maria Ilieva
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  5. Deepak
    Deepak avatar
    15 posts
    Member since:
    Jun 2010

    Posted 13 Aug 2010 Link to this post

    Well, I came to know that the controls which are getting added at the runtime needs to be added again to the page on every postback.
    and I did that it starts working.
Back to Top