[thelist] Dropdown list not retaining selected value

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Fri Jun 10 09:28:56 CDT 2005


   I have to concur with Volkan; the Viewstate is an unruly beast.  If you can't find another way around this, I'd suggest an old-school approach:  pull the Request.Form("dropdownName") value and use it to select the proper item.
   This is basically the technique used in EasyListBox, which doesn't depend on Viewstate to keep selections at all.

Cheers,

Peter

 From: VOLKAN ÖZÇELIK volkan.ozcelik at gmail.com

Hi,

I don't know the cause of the problem, and I have not coincided
something similar. But it appears that the viewstate does not persist
correctly. This may be an MS bug which has not been caught yet.

As an alternative approach, you may have two panels and play with
their visibility server-side, instead of moving an entire panel along.
It will be somewhat markup duplication, but will solve the problem
imho.

HTH,
Volkan.

On 6/10/05, Himani Khisti wrote:
> Hi List,
> 
> I'm working on a ASP.NET application.
> I'm facing a very weird problem.(Every developer feels this before he finds solution!) I have a dropdown list on a panel (panel2) on extreme right (in 2nd of 
). The control hierarchy is:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Need of the application is after a particular action has taken place, this whole panel be moved to a panel (panel1) on extreme left (in 1st   of 
) of the page.
> Everything works fine until all controls are moved from panel2 to panel1. After moving them I always get selectedindex of the dropdown as -1, right from the Page_Load event itself. SelectedIndexChanged event is fired though.
> 
> Can anyone help me??
> 
> Himani K
> 
> --
> 
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
-- 

* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 




More information about the thelist mailing list