[thelist] Dropdown list not retaining selected value

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Fri Jun 10 08:02:54 CDT 2005


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 <hkhisti at oas.co.in> 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 <TD> of <Table>). The control hierarchy is:
> <asp:Panel>
>    <asp:Table>
>        <asp:TableRow>
>            <asp:TableCell>
>                <asp:Label> </asp:Label>
>                <asp:dropdownlist></asp:dropdownlist>
>            </asp:TableCell>
>        </asp:TableRow>
>    </asp:Table>
> </asp:Panel>
> 
> 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 <TD> of <Table>) 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 !
>


More information about the thelist mailing list