asp.net - Using a dropdownlist from one <asp> section to update a grid view in another <asp> section -


i have above problem, if include dropdownlist, data source , grid view in 1 section works fine. need have grid view in central section whilst keeping dropdownlist box left. hoped use left1.sqldatasource or left1/sqldatasource these dont work.

any ideas how reference dropdownlist in central grid view?

code

<asp:content id="content2" contentplaceholderid="left1" runat="server">  <div id="head2">     start here:      <asp:dropdownlist id="dropdownlist1" runat="server" autopostback="true">         <asp:listitem>please select genre</asp:listitem>                 <asp:listitem>chart</asp:listitem>         <asp:listitem>house</asp:listitem>         <asp:listitem>techno</asp:listitem>         <asp:listitem>dubstep</asp:listitem>         <asp:listitem>drum , bass</asp:listitem>       </asp:dropdownlist>             </div>     </asp:content> <asp:content id="content3" contentplaceholderid="center1" runat="server"> <asp:sqldatasource id="sqldatasource1" runat="server" connectionstring="<%$  connectionstrings:connectionstring %>" providername="<%$ connectionstrings:connectionstring.providername %>" selectcommand="select * [betable1]">     </asp:sqldatasource>     <asp:gridview id="gridview1" runat="server" autogeneratecolumns="false" datakeynames="id" datasourceid="sqldatasource1" allowpaging="true" allowsorting="true">         <columns>             <asp:commandfield showselectbutton="true" />             <asp:boundfield datafield="id" headertext="id" insertvisible="false" readonly="true" sortexpression="id" />             <asp:boundfield datafield="show" headertext="show" sortexpression="show" />             <asp:boundfield datafield="genre" headertext="genre" sortexpression="genre" />             <asp:boundfield datafield="date" headertext="date" sortexpression="date" />             <asp:boundfield datafield="venue" headertext="venue" sortexpression="venue" />             <asp:boundfield datafield="price" headertext="price" sortexpression="price" />         </columns>     </asp:gridview> </asp:content> 

<asp:content id="content2" contentplaceholderid="left1" runat="server">  <div id="head2">     start here:      <asp:dropdownlist id="dropdownlist1" runat="server" autopostback="true">         <asp:listitem>please select genre</asp:listitem>                 <asp:listitem>chart</asp:listitem>         <asp:listitem>house</asp:listitem>         <asp:listitem>techno</asp:listitem>         <asp:listitem>dubstep</asp:listitem>         <asp:listitem>drum , bass</asp:listitem>       </asp:dropdownlist>             </div>     </asp:content> <asp:content id="content3" contentplaceholderid="center1" runat="server"> <asp:sqldatasource id="sqldatasource1" runat="server" connectionstring="<%$  connectionstrings:connectionstring %>" providername="<%$ connectionstrings:connectionstring.providername %>" selectcommand="select * [betable1]">     </asp:sqldatasource>     <asp:gridview id="gridview1" runat="server" autogeneratecolumns="false" datakeynames="id" datasourceid="sqldatasource1" allowpaging="true" allowsorting="true">         <columns>             <asp:commandfield showselectbutton="true" />             <asp:boundfield datafield="id" headertext="id" insertvisible="false" readonly="true" sortexpression="id" />             <asp:boundfield datafield="show" headertext="show" sortexpression="show" />             <asp:boundfield datafield="genre" headertext="genre" sortexpression="genre" />             <asp:boundfield datafield="date" headertext="date" sortexpression="date" />             <asp:boundfield datafield="venue" headertext="venue" sortexpression="venue" />             <asp:boundfield datafield="price" headertext="price" sortexpression="price" />         </columns>     </asp:gridview> </asp:content> 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -