Hi,
I'm having difficulties sorting this issue!!! I have 3 cascading dropdown lists that based on choosing the value of first dropdown, the OnSelectedIndex event will be called to bind the data of the second ddl and so on. I have to set the auto post back to true to be able to refresh the ddl. but the whole page is reloading and scrolling to the top of the page on the autopostback.
I have searched alot and some of the suggestions are to use the Update control panel to avaid page juping to the top and maitaing the scroll position, the problem is when I put all the three ddl in the update panel the selectedIndexChanged event will not fire to generate the second and third ddl.
any suggestions? :)
<asp:UpdatePanelID="UpdatePanel1"runat="server"updatemode="Always">
<ContentTemplate>
<asp:LabelID="lbltxtDeviceType"runat="server"Text="Device type: "/>
<asp:DropDownListID="ddlDeviceType"runat="server"AutoPostBack="true"OnSelectedIndexChanged="ddlDeviceType_SelectedIndexChanged"CssClass="ddl"Width="15%"BackColor="#F6F1DB"ForeColor="#7d6754"Font-Names="Andalus"Style="margin-right: 30px; ">
<asp:ListItemText="---- Select Device ----"Value=""/>
</asp:DropDownList>
<asp:LabelID="lbltxtDeviceModel"runat="server"Text="Model:"/>
<asp:DropDownListID="ddlDeviceModel"runat="server"OnSelectedIndexChanged="ddlDeviceModel_SelectedIndexChanged"AutoPostBack="true"Enabled="false"CssClass="ddl"Width="15%"BackColor="#F6F1DB"ForeColor="#7d6754"Font-Names="Andalus"Style="margin-right: 30px;">
<asp:ListItemText="----- Select Model ----"Value=""/>
</asp:DropDownList>
<asp:LabelID="lbltxtAssetCode"runat="server"Text="Asset Code: "/>
<asp:DropDownListID="ddlAssetcode"runat="server"OnSelectedIndexChanged="ddlAssetcode_SelectedIndexChanged"Enabled="false"AutoPostBack="true"CssClass="ddl"Width="15%"BackColor="#F6F1DB"ForeColor="#7d6754"Font-Names="Andalus">
<asp:ListItemText="--Select Asset Code--"Value=""/>
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTriggerControlID="ddlDeviceType"EventName="SelectedIndexChanged"/>
</Triggers>
</asp:UpdatePanel>