I have a repeater where the data is filtered by a param in the querystring. In the repeater I have a dropdown that needs to only show the data based upon the filter I set up in the datasource. I have a section below the dropdown where I can hardcode the filter param (item_id) but I need that hardcoded part to dynamically pass in the current items value. Thanks for any assistance
<!-- Repeater -->
<asp:Repeater ID="QueryStringRepeater" runat="server" DataSourceID="CategoryFilterbyQueryStringObjectDat aSource">
<itemtemplate>
<!-- Dropdown -->
<asp:DropDownList ID="SizeDropDownList" DataValueField="size" runat="server" DataSourceID="SizeFilterSqlDataSource">
</asp:DropDownList>
<%SizeFilterSqlDataSource.SelectParameters["item_id"].DefaultValue = "2"; %>
<!-- Here are my datasources-->
<asp:ObjectDataSource ID="CategoryFilterObjectDataSource" runat="server"
SelectMethod="GetSaleItemsbyCategory" TypeName="categoryfilterTableAdapters.saleitemsTab leAdapter" OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:controlParameter ControlID="categoryDropDown" Name="category" PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="CategoryFilterbyQueryStringObjectDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetSaleItemsbyCategory"
TypeName="categoryfilterTableAdapters.saleitemsTab leAdapter">
<SelectParameters>
<asp:QueryStringParameter Name="category" QueryStringField="category" Type="String" DefaultValue="apparel" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:SqlDataSource ID="SizeFilterSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT sizes.size FROM saleitems INNER JOIN size_trans ON saleitems.item_id = size_trans.item_id INNER JOIN sizes ON size_trans.size_id = sizes.size_id WHERE (saleitems.item_id = @item_id)">
<SelectParameters>
<asp:Parameter DefaultValue="1" Name="item_id" />
</SelectParameters>
</asp:SqlDataSource>