Note that there are some explanatory texts on larger screens.

plurals
  1. POAsp.net: ScriptManager doesn't work
    primarykey
    data
    text
    <p>I'm trying to populate one dropdownlist from another dropdownlist (filter the data) I understand that I suppose to make a scriptmanager but it gives me an error:</p> <blockquote> <p>The control with ID '' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.</p> </blockquote> <p>This is my code: </p> <pre><code> &lt;td&gt;School&lt;/td&gt; &lt;td&gt; &lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&gt; &lt;asp:DropDownList ID="SchoolRegister" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="SchoolName" DataValueField="ID"&gt; &lt;/asp:DropDownList&gt; &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="&lt;%$ ConnectionStrings:DanielConnectionString %&gt;" SelectCommand="SELECT * FROM [Schools]"&gt;&lt;/asp:SqlDataSource&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Class&lt;/td&gt; &lt;td&gt; &lt;asp:ScriptManager ID="ScriptManager2" runat="server" /&gt; &lt;asp:DropDownList ID="ClassRegister" runat="server" DataSourceID="SqlDataSource2" DataTextField="ClassName" DataValueField="ID"&gt; &lt;/asp:DropDownList&gt; &lt;asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="&lt;%$ ConnectionStrings:DanielConnectionString %&gt;" SelectCommand="SELECT * FROM [Class] WHERE ([SchoolID] = @SchoolID)"&gt; &lt;SelectParameters&gt; &lt;asp:ControlParameter ControlID="SchoolRegister" Name="SchoolID" PropertyName="SelectedValue" Type="Int32" /&gt; &lt;/SelectParameters&gt; &lt;/asp:SqlDataSource&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload