This is a migrated thread and some comments may be shown as answers.

AutoPostBack for radComboBox

1 Answer 443 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tal
Top achievements
Rank 1
Tal asked on 23 Aug 2013, 07:01 AM
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

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 27 Aug 2013, 11:29 AM
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.
Tags
General Discussions
Asked by
Tal
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or