-
November 30th, 2008, 05:59 PM
#1
DropDownList is losing state when using an UpdatePanel
Dear Gurus,
I have an UpdatePanel with a DropDownList
(AutoPostBack="true")
Its being triggered in the UpdatePanel like this
<AJAX:AsyncPostBackTriggerControlID="_benefitGroup"EventName="SelectedIndexChanged"/>
The problem is that every refresh to the page causes the drop down to lose it's state,
How can I make it remember the last selection state without using the session ?
(what is wrong with the ViewState / UpdatePanel ?)
Best Regards - Yovav
-
December 1st, 2008, 07:21 PM
#2
Re: DropDownList is losing state when using an UpdatePanel
It depends on how you fill your drop down list with data. Try avoid changing the drop down during postbacks:
Code:
If (Not Page.IsPostBack) Then
DropDownList1.Items.Add("a")
DropDownList1.Items.Add("b")
DropDownList1.Items.Add("c")
DropDownList1.Items.Add("d")
End If
- petter
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|