asp.net - DropdownList reset not working in Updatepanel on Submit button -


i have dropdown list in updatepanel. have fill dropdown on client event through javascript calls __dopostback of updatepanel , calls load event.

problem when submit form updatepanel_load event execute again , again reset dropdownlist causes loss of selectedvalue in dropdown.

<asp:updatepanel  id="updatepanel3" runat="server" onload="updatepanel3_load" updatemode="conditional">     <contenttemplate>          <asp:dropdownlist id="ddlitems" runat="server" cssclass="dropdown">                          </asp:dropdownlist>                      </contenttemplate> </asp:updatepanel> 

on page load dropdown empty .... no function fill it.

now problem when ever fill dropdown through load of upatepanel, updatepanel load event execute when submit page. solution of javascript due table , on selection of table row item fills dropdownlist __dopostback of updatepanel.

i have button opens popup window , popup window contains table, when client select item table , close popup window fill dropdown (in parent or opener page through ajax, updatepanel's load) further selction option. dropdown databind dependent on tables input.

what page load? if loading ddl in page load, load items on every click. use;

if not page.ispostback 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -