AutoPostBack for radComboBox

2 posts, 0 answers
  1. Tal
    Tal avatar
    22 posts
    Member since:
    May 2013

    Posted 23 Aug 2013 Link to this post

    Hey,
    I am having an aspx file where a value is saved in a variable after user inputs data. (i.e. customerID which is auto-generated from database is saved to an object  I defined).
    I am having one radComboBox which I set autoPostBack = true because I want other radComboBox's datasource to fulfill accordingly to the first one, but when I choose a value from the first combo the whole page refreshes because of the autoPostBack=true and the variable of the customer is set to null and doesn't keep its value.
    Is there a good way to bypass this problem without using session parameters ?

    It should be mentioned,my aspx file is having radMultiPage with 3 radPageViews.
    The 1st tab is where i get the new information, which I put in the 2nd tab, and my 2 comboboxes are on the 2nd tab.


    Thank you,
    Tal

  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 27 Aug 2013 Link to this post

    Hi Tal,

    The value of the CustomerID object will be lost after postback if you don't recreate it or keep the value somewhere.  I think using the Session State is a good option. However there are multiple other options which you can use. For example store the CustomerID's value in a hidden field. The complete list is here.

    Regards,
    Hristo Valyavicharski
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top