I'm working on this pop up that takes the database name from dropdown and opens corresponding tables of that database and list the attributes in the gridview below but when database index is changed corresponding tables are loaded but there attributes doesn't appear in the gridview! secondly when a database or table is selected the option can't be changed e.g "newdb" is selected and I click "olddb" from dropdown the selected db doesn't change and remains "newdb"
Here is the code
<div class="QTPopup"><div class="popupGrayBg"></div><div class="QTPopupCntnr"><div class="gpBdrLeftTop"></div><div class="gpBdrRightTop"></div><div class="gpBdrTop"></div><div class="gpBdrLeft"><div class="gpBdrRight"><div class="caption">
Create Queries</div><a href="#" class="closeBtn" title="Close"></a><div class="content"><p>Which fields you want in your query? </p><asp:ScriptManager EnablePartialRendering="true"
ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:UpdatePanel ID="UpdatePanel1" runat="server"
UpdateMode="Conditional"><ContentTemplate><span style ="font-family:Arial">Select Databases : </span><asp:DropDownList ID="ddldb" runat="server" AutoPostBack = "true"
OnSelectedIndexChanged="ddldb_SelectedIndexChanged" ><asp:ListItem Text = "--Select Databases--" Value = ""></asp:ListItem></asp:DropDownList></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="ddldb" EventName="SelectedIndexChanged" /></Triggers></asp:UpdatePanel><br/><br/><asp:UpdatePanel ID="UpdatePanel2" runat="server"
UpdateMode="Conditional"><ContentTemplate><span style ="font-family:Arial">Select Tables: </span><asp:DropDownList ID="ddltables" runat="server" AutoPostBack = "true"
Enabled = "false" OnSelectedIndexChanged="ddltable_SelectedIndexChanged" DataValueField="tableid"><asp:ListItem Text = "--Select Table--" Value = ""></asp:ListItem></asp:DropDownList></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="ddltables" EventName="SelectedIndexChanged" /></Triggers></asp:UpdatePanel><br/><br/><p> Available Fields</p><div class="popbox1"><asp:UpdatePanel ID="UpdatePanel3" runat="server"
UpdateMode="Conditional"><ContentTemplate><asp:GridView ID="GridView1" HeaderStyle-BackColor="#3AC0F2" HeaderStyle-ForeColor="White"
runat="server" AutoGenerateColumns="false" OnRowDataBound = "OnRowDataBound" OnSelectedIndexChanged = "OnSelectedIndexChanged"><Columns><asp:BoundField DataField="columnNAme" HeaderText="Column" ShowHeader="false" ItemStyle-Width="200" ItemStyle-BackColor="White" /></Columns></asp:GridView><asp:LinkButton ID="lnkDummy" runat="server"></asp:LinkButton></div> </ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="GridView1" EventName="SelectedIndexChanged" /></Triggers></asp:UpdatePanel><div class="signsbox"><asp:button id="oneselectedToRight" runat="server" Text=">" OnClick="oneselectedToRight_Click" /><br/><br/><asp:button id="allvaluesToRight" runat="server" Text=">>" OnClick="allvaluesToRight_Click"/> <br/><br/><asp:button id="oneselectedToLeft" runat="server" Text="<" OnClick="oneselectedToLeft_Click" /> <br/><br /><asp:button id="allvaluesToLeft" runat="server" Text="<<" OnClick="allvaluesToLeft_Click" /></div><div class="popbox2"> <asp:GridView ID="GridView2" HeaderStyle-BackColor="#3AC0F2" HeaderStyle-ForeColor="White"
OnRowDataBound="GridView2_RowDataBound" OnSelectedIndexChanged="GridView2_SelectedIndexChanged" runat="server" AutoGenerateColumns="false" ><Columns><asp:BoundField DataField="columnNAme" HeaderText="Column" ShowHeader="true" ItemStyle-Width="150" ItemStyle-BackColor="White" /></Columns></asp:GridView></div> <br/><div style="color:red;">* Underline Column shows it is PRIMARY KEY</div> <div class="container"> <asp:button id="Joinplace" runat="server" class="btn btn-info " Text="Join Tables" OnClick="Joinplace_Click" /><asp:button id="nextplace" runat="server" class="btn btn-info " Text="Next" ToolTip="Direct to Query Page" OnClick="nextplace_Click"/><%--<button type="button" class="btn btn-info " id="buttonplace">Join Tables</button> <button type="button" class="btn btn-info " runat="server"><a href="addtable.aspx">Next</a></button> --%></div></div></div></div><div class="gpBdrLeftBottom"></div><div class="gpBdrRightBottom"></div><div class="gpBdrBottom"></div></div></div>Please help me out!